The WP Statistics is a widely used plugin with over 600k active installations and is used as a self-hosted solution to track analytics.
The WP Statistics plugin uses the following custom database tables for data storage;
wp_statistics_exclusions
wp_statistics_historical
wp_statistics_pages
wp_statistics_search
wp_statistics_useronline
wp_statistics_visit
wp_statistics_visitor
wp_statistics_visitor_relationships
The plugin does not have a built-in way to clean or delete the custom database tables other than manually deleting the custom tables using an application such as phpMyAdmin, or a plugin such as WP-Optimize.
If you use the WP-Optimize plugin to find the left-over database tables for the WP Statistics plugin, navigate to;
WP-Optimize > Database > Tables
Type statistics in the search bar to find the relevant database tables, as shown above, and click on the Remove button to delete the database table for the WP Statistics plugin.
To confirm that all of the database tables for WP Statistics have been deleted, click on Refresh from the top right, and no tables for the plugin should be showing.
Removing left-over plugin database tables after a plugin has been deactivated and deleted will help you clean the database regularly.
There are many alternative self-hosted analytics plugin solutions, such as Burst Statistics or Independent Analytics.