10% admin-panel-background-color

Code Review | Admin Panel Background Color

WordPress plugin Admin Panel Background Color scored 10% from 54 tests.

About plugin

  • Plugin page: admin-panel-backg...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.2-5.2.2
  • WordPress version: 5.9.2
  • First release: May 17, 2018
  • Latest release: Aug 4, 2019
  • Number of updates: 5
  • Update frequency: every 88.8 days
  • Top authors: castellar120 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 548 total downloads


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
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.424.93 ▼49.76
Dashboard /wp-admin2.11 ▼1.296.76 ▼26.57
Posts /wp-admin/edit.php2.11 ▼1.535.40 ▼34.29
Add New Post /wp-admin/post-new.php2.11 ▼4.865.18 ▼1,281.91
Media Library /wp-admin/upload.php2.11 ▼1.185.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
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,817 ▲7316.30 ▲1.185.71 ▼0.412.10 ▲0.08
Dashboard /wp-admin2,927 ▲697.00 ▲0.83120.23 ▼16.58155.57 ▼7.39
Posts /wp-admin/edit.php2,726 ▲353.35 ▲0.1270.76 ▲4.86156.75 ▲11.02
Add New Post /wp-admin/post-new.php1,810 ▲17116.96 ▼5.35435.89 ▲13.71172.62 ▲23.94
Media Library /wp-admin/upload.php1,732 ▲346.17 ▲0.63117.01 ▼31.16184.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

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


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
The official readme.txt is a good inspiration

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:
LanguageFilesBlank linesComment linesLines of code
Bourne Shell14318

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 code0.49
Average class complexity56.24
▷ Minimum class complexity1.00
▷ Maximum class complexity467.00
Average method complexity4.27
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
▷ Static methods93.08%
▷ Public methods10134.59%
▷ Protected methods18463.01%
▷ Private methods72.40%
▷ Named functions444.44%
▷ Anonymous functions555.56%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
FileSize - originalSize - compressedSavings
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.wheel.png24.30KB17.20KB▼ 29.20%
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.wheel_mask.png3.80KB2.08KB▼ 45.35%