Optimization Page

NOTICE: This document has been updated. For the latest version, please refer to the following links:

The Optimization page will allow you to do some basic maintenance tasks related to WP Statistics.

The optimization page looks like this:

Screenshot of Optimization page of WP Statistics WordPress plugin

It has six tabs:

  • Resources/Information
  • Export
  • Purging
  • Database
  • Updates
  • Historical

Resources/Information

The Resources/Information page has 4 subsections to it; Resources, Version Info, File Info and Client Info.

Resources

The Resources section contains some resource usage information.

Setting

Values

Description

Memory usage in PHP

Bytes

The number of bytes of memory WordPress is currently using.  This number is highly transitive and should only be used as a genera guide line.  Pages like the overview page use more memory than others.

PHP Memory Limit

N/A

The maximum amount of memory that PHP will allow a script to use before terminating the script.  This value is set in the php.ini file and must be set high enough to allow WP Statistics to load and manipulate data in the statistics charts.

Number of rows in the wp_statistics_useronline table

Rows

The number of rows in the users online table.

Number of rows in the wp_statistics_visit table

Rows

The number of rows in the views table.

Number of rows in the wp_statistics_visitor table

Rows

The number of rows in the visitors table.

Number of rows in the wp_statistics_exclusions table

Rows

The number of rows in the exclusions table.

Number of rows in the wp_statistics_pages table

Rows

The number of rows in the pages table.

Number of rows in the wp_statistics_historical table

Rows

The number of rows in the historical table.

Version Info

The Version Info section contains the various versions of the software installed on your server.

Setting

Values

Description

WP Statistics Version

Version

The version of the plug-in.

PHP Version

Version

The version of PHP.

PHP Safe Mode

Yes/No

Is PHP running in safe mode.  Note this is the value in php.ini, so even though PHP 5.4 and above deprecated safe mode, you may still have the value set in php.ini.  If you do, you should remove it.

PHP IPv6 Enabled

Yes/No

Is PHP compiled with IPv6 support. You may see warning messages in your PHP log if it is not and you receive HTTP headers with IPv6 addresses in them.

jQuery Version

Version

The version of jQuery.

cURL Version

Version

The PHP cURL Extension version you are running. cURL is required for the GeoIP code, if it is not installed GeoIP will be disabled.If the gzopen() function is installed. gzopen() is required for the GeoIP database to be downloaded successfully.

Zlib gzopen()

Yes/No

If the gzopen() function is installed. gzopen() is required for the GeoIP database to be downloaded successfully.

File Info

The File Info section contains information about the GeoIP and browscap files. Browscap has two files, the raw ini file downloaded from browscap.org and a cache file generated by the browscap library to improve performance on loading and lookups.

Setting

Values

Description

GeoIP Database

Size/Date

The file size and date of the GeoIP database installed on your system.

browscap.ini File

Size/Date

The file size and date of the browscap.ini installed on your system.

browscap Cache File

Size/Date

The file size and date of the browscap cache file installed on your system.

Client Info

The Client Info section contains some information about your current session.

Setting

Values

Description

Client IP

IP Address

The IP address you are currently connected from.

User Agent

String

Your user agent string.

Browser

String

The detected browser you are running.

Version

String

The detected browser version you are running.

Operating Systems

String

The detected Operating Systems you have.

Export

The Export page allows you to export the data from the database to a flat file. This is useful if you want to do additional analysis on the data or need to migrate to another statistics plug-in.

Setting

Values

Description

Export from

Table name

You can export from the three primary data tables.

Export To:

XML, CSV, TSV

The format to export to.

 

XML will export an XML formatted file.

 

CSV will export a comma separated value file.

 

TSV will export a tab separated value file.

Include Header Row

On/Off

Include a header row as the first line of the exported file.

Purging

The Purging page has 2 subsections to it; Data and Delete User Agent Types.

Data

The Data section allows you to purge information from the database..

Setting

Values

Description

Empty Table

Table name

This will delete ALL data from the selected tables.  Only do this if you are absolutely sure you want to reset all of your statistics.

Purge records older than

Number

Deleted user statistics data older than the selected number of days. Minimum value is 30 days.  Since WP Statistics 8.2 the pruned data will be summarized in to the historical database.

Purge visitors with more than

Number

Deleted user statistics data where the user has more than the defined number of hits in a day. This can be useful to clear up old data when your site has been hit by a bot.

 

This will remove the visitor and their hits to the site, however it will not remove individual page hits as that data is not recorded on a per use basis.

 

Minimum value is 10 hits.

Delete User Agent Types

The Delete User Agent Types section allows you to delete various user agent types from the database. This can be used to remove robots or other types of agents that are not real users.

Setting

Values

Description

Delete Agents

Agent name

This will delete ALL visitors with the selected agent type.

Delete Operating Systems

Operating System name

This will delete ALL visitors with the selected Operating System.

Database

The Database page allows you to rerun the install routine or add a unique index to the Visitors table to protect against duplicate entries.

Database Setup

If for some reason you have had to delete one or more tables from the database server (perhaps a corrupt table or recovering from an incomplete backup) WP Statistics will warn you that the tables are missing however it will only run the database install/upgrade code during a version change.

This option will let you re-run the WP Statistics setup routine without having to manipulate the WordPress options table or the WP Statistics code.

This should only be done as a last resort.

Database Index

There are two indexes that older installs of WP Statistics do not have on the tables in the database. Adding these during the setup process can cause timeout’s and so they are available to be added manually by the administrator.

If you do not have these indexes you will be presented with a button to add each index to the table.

Search Table

WP Statistics 9.5 added a new table and code to better handle referrers and search words, however converting older installs requires a manual upgrade, presented here if required.

Updates

The Updates page allows you to update data in the database for GeoIP and Hash IP addresses.

GeoIP Options

Setting

Values

Description

Countries

N/A

Selecting the “Update Now!” button will try and update any missing geolocation information in the visitors table.  This can also be automated with the Statistics->Settings->GeoIP->Populate missing GeoIP after update of GeoIP DB setting.

 

Note if you have selected to hash the IP addresses then this will not function for those entires with hashed values.

IP Addresses

Setting

Values

Description

Hash IP Addresses

N/A

Selecting the “Update Now!” button will replace all IP addresses in the database with hash values.

 

You will not be able to recover the IP addresses in the future to populate location information if this is selected.

Historical

The Historical page allows you to configure the values to add to the total views and visitors for your site. These values are auto incremented when any purging of data is done. Purging data also records page hits, however there is no user interface available for changing the values for page entries.

Note that if you use the purge function in the optimization page you should reload the page before editing these numbers as they will not be accurate.

Historical Values

Setting

Values

Description

Visitors

Number

A number of visitors to add to the total number of visitors to your site.  This is useful if you have migrated from another statistics plugin or have purged data in the past to give an accurate total visitors count for your site.

Views

Number

A number of views to add to the total number of views to your site.  This is useful if you have migrated from another statistics plugin or have purged data in the past to give an accurate total views count for your site.

Leave Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.