Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.11MB] [CPU: ▼3.15ms] Passed 4 tests
Server-side resources used by User Stats
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.11 | 38.55 ▼5.73 |
Dashboard /wp-admin | 3.42 ▲0.11 | 50.42 ▲4.30 |
Posts /wp-admin/edit.php | 3.53 ▲0.17 | 51.46 ▼2.94 |
Add New Post /wp-admin/post-new.php | 6.00 ▲0.11 | 95.40 ▼5.45 |
Media Library /wp-admin/upload.php | 3.34 ▲0.11 | 34.99 ▲1.51 |
User Stats /wp-admin/users.php?page=user-stats | 3.63 | 34.07 |
Server storage [IO: ▲0.32MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_userstats_count |
New WordPress options |
---|
db_upgraded |
user_stats_nag |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for User Stats
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,793 ▲32 | 13.91 ▼0.38 | 1.82 ▲0.22 | 39.91 ▼1.49 |
Dashboard /wp-admin | 2,199 ▲22 | 5.63 ▼0.03 | 90.35 ▼1.17 | 40.10 ▼2.31 |
Posts /wp-admin/edit.php | 2,101 ▲1 | 2.02 ▲0.07 | 39.49 ▲4.13 | 36.15 ▼4.73 |
Add New Post /wp-admin/post-new.php | 1,537 ▲11 | 17.98 ▼5.19 | 625.42 ▼27.70 | 66.97 ▲11.36 |
Media Library /wp-admin/upload.php | 1,401 ▲1 | 4.18 ▼0.02 | 102.95 ▼5.07 | 43.80 ▼1.04 |
User Stats /wp-admin/users.php?page=user-stats | 1,101 | 2.39 | 44.54 | 36.89 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- The plugin did not uninstall successfully, leaving 1 table in the database
- wp_userstats_count
- The uninstall procedure has failed, leaving 7 options in the database
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- user_stats_nag
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
- 20 occurences, only the last one shown
- > GET request to /wp-admin/users.php?page=user-stats
- > Notice in wp-content/plugins/user-stats/views/options.php+354
Trying to access array offset on value of type bool
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 7× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Notice
Undefined variable: namespace in wp-content/plugins/user-stats/views/options.php on line 1
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-stats/lib/constants.php on line 19
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/user-stats/lib/constants.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-stats/lib/shortcodes.php:2
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/user-stats/lib/constants.php on line 19
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/user-stats/views/options.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/user-stats/lib/constants.php:19
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: statistics, stats, author, post count, user
user-stats/user-stats.php Passed 13 tests
The primary PHP file in "User Stats" version 1.0.7 is used by WordPress to initiate all plugin functionality
101 characters long description:
Get post count, post view count, cost per article, cost per 1000 views and more stats for your Users.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,201 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 439 | 235 | 1,012 |
CSS | 3 | 74 | 43 | 794 |
JavaScript | 4 | 127 | 38 | 211 |
PO File | 2 | 81 | 84 | 184 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 19.00 |
▷ Minimum class complexity | 19.00 |
▷ Maximum class complexity | 19.00 |
Average method complexity | 2.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 16 | |
▷ Static methods | 3 | 18.75% |
▷ Public methods | 13 | 81.25% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 18.75% |
Functions | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
css/images/ui-icons_cd0a0a_256x240.png | 4.44KB | 4.17KB | ▼ 6.02% |
css/images/ui-bg_flat_75_ffffff_40x100.png | 0.20KB | 0.08KB | ▼ 58.17% |
css/images/ui-bg_glass_95_fef1ec_1x400.png | 0.32KB | 0.15KB | ▼ 54.82% |
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png | 0.27KB | 0.18KB | ▼ 35.00% |
images/combine.png | 0.30KB | 0.45KB | 0.00% |