Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼0.68MB] [CPU: ▼322.69ms] Passed 4 tests
A check of server-side resources used by AdminSanity
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.13 ▲0.61 | 58.24 ▼2.30 |
Dashboard /wp-admin | 3.65 ▲0.24 | 23.11 ▼11.38 |
Posts /wp-admin/edit.php | 3.65 ▲0.01 | 20.62 ▼16.59 |
Add New Post /wp-admin/post-new.php | 3.65 ▼3.32 | 20.04 ▼1,257.59 |
Media Library /wp-admin/upload.php | 3.65 ▲0.35 | 19.12 ▼5.19 |
AdminSanity /wp-admin/options-general.php?page=adminsanity | 3.65 | 20.54 |
Server storage [IO: ▲0.25MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 2 new options
New WordPress options |
---|
adminsanity |
adminsanity_first_install |
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 / | 4,057 ▲303 | 16.38 ▲0.80 | 6.00 ▲0.24 | 2.15 ▼0.47 |
Dashboard /wp-admin | 3,134 ▲273 | 6.48 ▲0.30 | 120.26 ▼24.08 | 198.07 ▲28.76 |
Posts /wp-admin/edit.php | 2,931 ▲240 | 3.30 ▲0.06 | 77.76 ▲14.25 | 188.21 ▲41.68 |
Add New Post /wp-admin/post-new.php | 1,847 ▲95 | 16.52 ▼4.38 | 428.64 ▼25.12 | 154.57 ▲2.23 |
Media Library /wp-admin/upload.php | 1,939 ▲241 | 5.75 ▲0.21 | 143.26 ▲0.12 | 220.04 ▲31.86 |
AdminSanity /wp-admin/options-general.php?page=adminsanity | 1,966 | 4.19 | 387.47 | 203.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/adminsanity/adminsanity/adminsanity-menu.php+371
Undefined index: c
- This plugin does not fully uninstall, leaving 2 options in the database
- adminsanity
- adminsanity_first_install
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
- 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+371
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+371
in_array() expects parameter 2 to be array, null given
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
- 5× PHP files trigger errors when accessed directly with GET requests:
- > 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 plugins_url() in wp-content/plugins/adminsanity/adminsanity.php:18
- > 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:2911
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adminsanity/adminsanity/adminsanity-menu.php:74
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
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: admin menu, cleaner, wordpress admin, admin notices, admin bar
adminsanity/adminsanity.php Passed 13 tests
"AdminSanity" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
45 characters long description:
Add Sanity back to your WordPress Admin Area.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,689 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 820 | 1,561 | 3,689 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Please tend to the following items
- Method cyclomatic complexity has to be reduced to less than 100 (currently 118)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 467.00 |
▷ Minimum class complexity | 467.00 |
▷ Maximum class complexity | 467.00 |
Average method complexity | 15.12 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 118.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 | 33 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 33 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 46 | |
▷ Named functions | 46 | 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
It is recommended to compress PNG files in your plugin to 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% |