How to Cleanup Data from the WP Statistics plugin

Heads up: This page may include affiliate links. Read the full disclosure.

Being able to view the analytics of who is visiting a site and how long they are on the site and what they are looking at is very useful to know, but using certain WordPress plugins to store analytics and statistical data in your site database is a bad idea, since it will bloat your sites database as well as cause CPU usage issues.

A plugin which has over 500,000+ active installs is WP Statistics, the plugin seems to have a number of issues in the amount of data it will store, how long the data is being stored for by default and for causing CPU usage issues, which will mean your site will not load and will return a 502 server error.

The plugins created custom database tables;
wp_statistics_exclusions
wp_statistics_historical
wp_statistics_pages
wp_statistics_search
wp_statistics_useronline
wp_statistics_visit
wp_statistics_visitor

Once you have deactivated then deleted the plugin the easiest way to remove the plugins tables is to use the WP Optimize plugin.

WP Optimize > Database > Tables

Then you can search for wp_statistics, next to each of the database tables click on the remove button and delete all seven of the database tables. To verify that those database tables have been deleted you can click on the refresh button and if none of the database tables can be found then they have been deleted.

Recommend for low-traffic sites is to use Slimstat Analytics plugin.

Other hosted analytics options include Google Analytics, Hotjar or Fathom. Using any of the other analytics services have plugins that work very well with them and those do not cause performance issues.

Links to the plugins that work well for Google Analytics, Hotjar and Fathom Analytics.

https://wordpress.org/plugins/ga-google-analytics/
https://wordpress.org/plugins/hotjar/
https://wordpress.org/plugins/fathom-analytics/

Being able to capture site analytics but not in causing site issues is worth being able to do well.

Looking for something?

Privacy laws apply to businesses that collect personal information. Since no personal information is collected by the MainWP plugins, no privacy laws apply to the MainWP plugins. This includes GDPR, UK DPA 2018, PIPEDA, Australia Privacy Act 1988, LGPD, PIPL, and other privacy laws.
Donata Stroink-Skillrud
Donata Stroink-Skillrud
President of Agency Attorneys

Your Download Is Just One Click Away

…or just download the plugin.

By entering your email, you agree to our Terms of Service and Privacy Policy.