Benchmarks
Plugin footprint 64% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲5.80MB] [CPU: ▲26.88ms] 50% from 4 tests
Server-side resources used by WP Statistics
It is recommended to improve the following
- CPU: Try to keep total CPU usage under 500.00ms (currently 1,168.56ms on /wp-admin/admin.php?page=wps_overview_page)
- Extra RAM: Extra memory usage must be kept under 5MB (currently 5.80MB on /wp-admin/admin.php?page=wps_break_menu)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.63 ▲5.16 | 67.17 ▲28.71 |
Dashboard /wp-admin | 9.34 ▲5.99 | 81.82 ▲20.75 |
Posts /wp-admin/edit.php | 9.55 ▲6.19 | 84.45 ▲38.95 |
Add New Post /wp-admin/post-new.php | 11.95 ▲6.06 | 121.23 ▲19.10 |
Media Library /wp-admin/upload.php | 9.23 ▲6.00 | 75.76 ▲39.02 |
Authors /wp-admin/admin.php?page=wps_authors_page | 9.25 | 68.43 |
Add-Ons /wp-admin/admin.php?page=wps_plugins_page | 9.30 | 1,401.42 |
Search Engines /wp-admin/admin.php?page=wps_searches_page | 9.25 | 65.89 |
Post Types /wp-admin/admin.php?page=wps_pages_page | 9.26 | 65.19 |
Online /wp-admin/admin.php?page=wps_online_page | 9.26 | 66.57 |
Browsers /wp-admin/admin.php?page=wps_browser_page | 9.26 | 69.50 |
Search Words /wp-admin/admin.php?page=wps_words_page | 9.25 | 68.65 |
Overview /wp-admin/admin.php?page=wps_overview_page | 9.30 | 1,168.56 |
Platforms /wp-admin/admin.php?page=wps_platform_page | 9.26 | 78.22 |
/wp-admin/admin.php?page=wps_break_menu | 9.18 | 62.09 |
Server storage [IO: ▲15.64MB] [DB: ▲0.01MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 857 new files
Database: 8 new tables, 10 new options
New tables |
---|
wp_statistics_historical |
wp_statistics_search |
wp_statistics_exclusions |
wp_statistics_visitor |
wp_statistics_useronline |
wp_statistics_visitor_relationships |
wp_statistics_visit |
wp_statistics_pages |
New WordPress options |
---|
wp_statistics_check_user_online |
wp_statistics_plugin_version |
can_compress_scripts |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
wp_statistics |
widget_theysaidso_widget |
widget_wp_statistics_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP Statistics
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,544 ▲798 | 14.34 ▼0.08 | 1.69 ▲0.06 | 32.27 ▼6.91 |
Dashboard /wp-admin | 2,940 ▲760 | 7.11 ▲1.47 | 184.52 ▲97.28 | 75.02 ▲34.61 |
Posts /wp-admin/edit.php | 2,228 ▲128 | 2.39 ▲0.43 | 37.83 ▼1.87 | 41.43 ▲6.34 |
Add New Post /wp-admin/post-new.php | 6,320 ▲4,785 | 26.51 ▲8.06 | 896.56 ▲219.32 | 39.57 ▼31.74 |
Media Library /wp-admin/upload.php | 1,483 ▲86 | 4.17 ▼0.03 | 95.38 ▼2.57 | 42.88 ▼7.64 |
Authors /wp-admin/admin.php?page=wps_authors_page | 1,476 | 4.23 | 128.40 | 97.04 |
Add-Ons /wp-admin/admin.php?page=wps_plugins_page | 1,597 | 2.82 | 41.45 | 96.96 |
Search Engines /wp-admin/admin.php?page=wps_searches_page | 1,312 | 3.32 | 53.78 | 79.65 |
Post Types /wp-admin/admin.php?page=wps_pages_page | 1,400 | 3.44 | 52.25 | 48.64 |
Online /wp-admin/admin.php?page=wps_online_page | 1,045 | 2.86 | 37.74 | 66.89 |
Browsers /wp-admin/admin.php?page=wps_browser_page | 1,326 | 3.63 | 60.63 | 46.58 |
Search Words /wp-admin/admin.php?page=wps_words_page | 1,135 | 2.82 | 36.78 | 70.16 |
Overview /wp-admin/admin.php?page=wps_overview_page | 2,800 | 4.70 | 108.41 | 76.86 |
Platforms /wp-admin/admin.php?page=wps_platform_page | 1,362 | 3.51 | 60.96 | 72.23 |
/wp-admin/admin.php?page=wps_break_menu | 938 | 1.97 | 28.25 | 40.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- The plugin did not uninstall successfully, leaving 8 tables in the database
- wp_statistics_visit
- wp_statistics_visitor
- wp_statistics_visitor_relationships
- wp_statistics_search
- wp_statistics_useronline
- wp_statistics_exclusions
- wp_statistics_pages
- wp_statistics_historical
- This plugin did not uninstall successfully, leaving 10 options in the database
- can_compress_scripts
- widget_wp_statistics_widget
- wp_statistics_plugin_version
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
- wp_statistics
- wp_statistics_check_user_online
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
- > GET request to /wp-admin/admin.php?page=wps_break_menu
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, class 'WP_STATISTICS\exclusions_page' does not have a method 'exclusions'
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 10× PHP files output text when accessed directly:
- > /wp-content/plugins/wp-statistics/includes/admin/templates/layout/postbox.hide.php
- > /wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/bin/update-profiles.php
- > /wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/bin/update-browser-ids.php
- > /wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/bin/update-chrome.php
- > /wp-content/plugins/wp-statistics/includes/admin/templates/layout/footer.php
- > /wp-content/plugins/wp-statistics/includes/admin/templates/optimization.php
- > /wp-content/plugins/wp-statistics/includes/admin/templates/layout/postbox.toggle.php
- > /wp-content/plugins/wp-statistics/includes/admin/templates/layout/tabs-settings.php
- > /wp-content/plugins/wp-statistics/includes/admin/templates/header.php
- > /wp-content/plugins/wp-statistics/includes/admin/templates/emails/default.php
- 274× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-statistics/includes/admin/templates/pages/visitors.php:21
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Record\\AbstractPlaceRecord' not found in wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Record/Subdivision.php:29
- > PHP Fatal error
Uncaught Error: Class 'GeoIp2\\Model\\AbstractModel' not found in wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/src/Model/Domain.php:19
- > PHP Fatal error
Uncaught Error: Class 'WP_STATISTICS\\Menus' not found in wp-content/plugins/wp-statistics/includes/admin/pages/class-wp-statistics-admin-page-plugins.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function WP_STATISTICS\\add_action() in wp-content/plugins/wp-statistics/includes/admin/pages/class-wp-statistics-admin-page-overview.php:21
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-statistics/includes/vendor/geoip2/geoip2/examples/benchmark.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-statistics/includes/admin/templates/settings.php:5
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Data\\DeviceModels' not found in wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/data/indices/models-brew.php:5
- > PHP Warning
count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/wp-statistics/includes/vendor/whichbrowser/parser/bin/query.php on line 13
- > PHP Fatal error
Uncaught Error: Call to undefined function WP_STATISTICS\\add_action() in wp-content/plugins/wp-statistics/includes/admin/class-wp-statistics-admin-export.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
- Tags: Too many tags (27 tag instead of maximum 10); only the first 5 tags are used in your directory listing
wp-statistics/wp-statistics.php Passed 13 tests
The principal PHP file in "WP Statistics" v. 14.2 is loaded by WordPress automatically on each request
74 characters long description:
This plugin gives you the complete information on your website's visitors.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin119,544 lines of code in 795 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 367 | 8,948 | 8,430 | 78,319 |
SVG | 278 | 1 | 0 | 19,657 |
JavaScript | 60 | 518 | 691 | 13,641 |
Sass | 65 | 1,003 | 91 | 5,795 |
C | 1 | 97 | 18 | 589 |
Markdown | 5 | 194 | 0 | 500 |
JSON | 4 | 0 | 0 | 469 |
CSS | 8 | 85 | 6 | 414 |
YAML | 4 | 18 | 0 | 80 |
Bourne Shell | 1 | 20 | 0 | 40 |
m4 | 1 | 8 | 0 | 32 |
C/C++ Header | 1 | 4 | 12 | 8 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
These items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 107)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 21.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 489.00 |
Average method complexity | 4.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 107.00 |
Code structure | ||
---|---|---|
Namespaces | 32 | |
Interfaces | 6 | |
Traits | 26 | |
Classes | 199 | |
▷ Abstract classes | 6 | 3.02% |
▷ Concrete classes | 193 | 96.98% |
▷ Final classes | 1 | 0.52% |
Methods | 1,222 | |
▷ Static methods | 416 | 34.04% |
▷ Public methods | 913 | 74.71% |
▷ Protected methods | 63 | 5.16% |
▷ Private methods | 246 | 20.13% |
Functions | 68 | |
▷ Named functions | 36 | 52.94% |
▷ Anonymous functions | 32 | 47.06% |
Constants | 112 | |
▷ Global constants | 9 | 8.04% |
▷ Class constants | 103 | 91.96% |
▷ Public constants | 103 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 0.66MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/search-engine/unknown.png | 0.78KB | 0.82KB | 0.00% |
assets/images/pages-visitors-map-preview.png | 126.18KB | 70.18KB | ▼ 44.38% |
assets/images/pages-referring-preview.png | 173.49KB | 64.24KB | ▼ 62.97% |
assets/images/preview-lock.png | 0.52KB | 0.34KB | ▼ 33.90% |
assets/images/search-engine/duckduckgo.png | 0.67KB | 0.58KB | ▼ 14.24% |