Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
- Install procedure had errors
- > Notice in wp-content/plugins/admin-panel-background-color/src/Admin.php+1059
Undefined variable: currentUserId
Server metrics [RAM: ▼2.27MB] [CPU: ▼348.13ms] Passed 4 tests
Analyzing server-side resources used by Admin Panel Background Color
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.09 ▼1.42 | 4.93 ▼49.76 |
Dashboard /wp-admin | 2.11 ▼1.29 | 6.76 ▼26.57 |
Posts /wp-admin/edit.php | 2.11 ▼1.53 | 5.40 ▼34.29 |
Add New Post /wp-admin/post-new.php | 2.11 ▼4.86 | 5.18 ▼1,281.91 |
Media Library /wp-admin/upload.php | 2.11 ▼1.18 | 5.06 ▼21.07 |
Server storage [IO: ▲0.36MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 102 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Checking browser requirements for Admin Panel Background Color
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,817 ▲73 | 16.30 ▲1.18 | 5.71 ▼0.41 | 2.10 ▲0.08 |
Dashboard /wp-admin | 2,927 ▲69 | 7.00 ▲0.83 | 120.23 ▼16.58 | 155.57 ▼7.39 |
Posts /wp-admin/edit.php | 2,726 ▲35 | 3.35 ▲0.12 | 70.76 ▲4.86 | 156.75 ▲11.02 |
Add New Post /wp-admin/post-new.php | 1,810 ▲171 | 16.96 ▼5.35 | 435.89 ▲13.71 | 172.62 ▲23.94 |
Media Library /wp-admin/upload.php | 1,732 ▲34 | 6.17 ▲0.63 | 117.01 ▼31.16 | 184.04 ▼4.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 gracefully
- > Notice in wp-content/plugins/admin-panel-background-color/src/Admin.php+1059
Undefined variable: currentUserId
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
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 items
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/admin-panel-background-color/vendor/scssphp/tests/ExceptionTest.php:5
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/admin-panel-background-color/vendor/scssphp/tests/InputTest.php:15
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/admin-panel-background-color/vendor/scssphp/tests/ApiTest.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== admin-panel-background-color ===
) - Screenshots: Please describe screenshot #1 in admin-panel-background-color/assets to your readme.txt
admin-panel-background-color/admin-panel-background-color.php 85% from 13 tests
The main file in "Admin Panel Background Color" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
- Domain Path: The domain path points to a folder that does not exist ("/languages")
- Description: The description should be shorter than 140 characters (currently 188 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin9,663 lines of code in 89 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 19 | 1,065 | 1,134 | 4,778 |
Sass | 30 | 880 | 96 | 2,179 |
CSS | 28 | 483 | 22 | 1,553 |
Markdown | 2 | 138 | 0 | 556 |
JavaScript | 2 | 56 | 29 | 435 |
HTML | 1 | 8 | 7 | 75 |
JSON | 3 | 0 | 0 | 37 |
XML | 1 | 4 | 1 | 23 |
Bourne Shell | 1 | 4 | 3 | 18 |
YAML | 1 | 0 | 0 | 7 |
make | 1 | 1 | 0 | 2 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 104)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 56.24 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 467.00 |
Average method complexity | 4.27 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 104.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 17 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 17 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 292 | |
▷ Static methods | 9 | 3.08% |
▷ Public methods | 101 | 34.59% |
▷ Protected methods | 184 | 63.01% |
▷ Private methods | 7 | 2.40% |
Functions | 9 | |
▷ Named functions | 4 | 44.44% |
▷ Anonymous functions | 5 | 55.56% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
6 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.selector.png | 0.38KB | 0.39KB | 0.00% |
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.wheel.png | 24.30KB | 17.20KB | ▼ 29.20% |
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.wheel_mask.png | 3.80KB | 2.08KB | ▼ 45.35% |
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.wheel_cursor.png | 0.38KB | 0.39KB | 0.00% |
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.slider.png | 0.37KB | 1.58KB | 0.00% |