Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▼0.31MB] [CPU: ▼27.91ms] Passed 4 tests
Analyzing server-side resources used by AdminSanity
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.05 ▲0.59 | 45.17 ▲1.71 |
Dashboard /wp-admin | 3.64 ▲0.33 | 28.78 ▼23.96 |
Posts /wp-admin/edit.php | 3.64 ▲0.28 | 30.72 ▼15.86 |
Add New Post /wp-admin/post-new.php | 3.64 ▼2.25 | 31.46 ▼66.95 |
Media Library /wp-admin/upload.php | 3.64 ▲0.41 | 27.54 ▼4.88 |
AdminSanity /wp-admin/options-general.php?page=adminsanity | 3.64 | 26.79 |
Server storage [IO: ▲0.26MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
adminsanity_first_install |
adminsanity |
can_compress_scripts |
Browser metrics Passed 4 tests
A check of browser resources used by AdminSanity
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,015 ▲269 | 13.78 ▼0.66 | 2.03 ▲0.20 | 31.44 ▼11.81 |
Dashboard /wp-admin | 2,365 ▲177 | 5.20 ▲0.30 | 108.83 ▲1.40 | 48.57 ▼0.33 |
Posts /wp-admin/edit.php | 2,260 ▲171 | 2.42 ▲0.43 | 46.38 ▲9.36 | 43.25 ▲9.59 |
Add New Post /wp-admin/post-new.php | 1,631 ▲112 | 17.92 ▼5.19 | 621.08 ▼24.93 | 49.62 ▼0.97 |
Media Library /wp-admin/upload.php | 1,555 ▲164 | 4.36 ▲0.15 | 104.20 ▼1.60 | 46.10 ▲2.63 |
AdminSanity /wp-admin/options-general.php?page=adminsanity | 1,489 | 4.23 | 453.50 | 47.21 |
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
The following items require your attention
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/adminsanity/adminsanity/adminsanity-menu.php+372
Undefined index: c
- Zombie WordPress options were found after uninstall: 8 options
- adminsanity
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
- adminsanity_first_install
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=adminsanity
- > Notice in wp-content/plugins/adminsanity/adminsanity/adminsanity-menu.php+372
Undefined index: c
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=adminsanity
- > Warning in wp-content/plugins/adminsanity/adminsanity/adminsanity-menu.php+372
in_array() expects parameter 2 to be array, null given
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
- 5× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adminsanity/adminsanity/adminsanity-menu.php:74
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/adminsanity/adminsanity.php:18
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/adminsanity/adminsanity/adminsanity-bar.php:63
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adminsanity/adminsanity/adminsanity-notices.php:88
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adminsanity/loader.php:3168
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: cleaner, admin menu, admin notices, wordpress admin, admin bar
adminsanity/loader.php 92% from 13 tests
The main PHP file in "AdminSanity" ver. 1.2.8 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("adminsanity.php" instead of "loader.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,797 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 862 | 1,733 | 3,797 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 129)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 489.00 |
▷ Minimum class complexity | 489.00 |
▷ Maximum class complexity | 489.00 |
Average method complexity | 14.94 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 129.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 | 35 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 35 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 47 | |
▷ Named functions | 47 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/wpmedic.png | 4.65KB | 2.48KB | ▼ 46.68% |
images/adminsanity.png | 8.59KB | 3.64KB | ▼ 57.64% |