10% admin-panel-background-color

Code Review | Admin Panel Background Color

WordPress plugin Admin Panel Background Color scored10%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: 6.3.1
  • 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 /713 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/admin-panel-background-color/src/Admin.php+1059
    Undefined variable: currentUserId

Server metrics [RAM: ▼1.77MB] [CPU: ▼53.25ms] Passed 4 tests

This is a short check of server-side resources used by Admin Panel Background Color
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.246.12 ▼34.02
Dashboard /wp-admin2.24 ▼1.066.97 ▼40.70
Posts /wp-admin/edit.php2.24 ▼1.127.76 ▼40.30
Add New Post /wp-admin/post-new.php2.24 ▼3.657.72 ▼97.98
Media Library /wp-admin/upload.php2.24 ▼0.995.94 ▼31.57

Server storage [IO: ▲0.36MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 102 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of 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 /2,835 ▲8913.83 ▼0.341.57 ▼0.2241.51 ▼5.35
Dashboard /wp-admin2,244 ▲565.26 ▼0.59117.02 ▲13.0038.09 ▼1.86
Posts /wp-admin/edit.php2,108 ▲192.68 ▲0.6944.90 ▲8.5636.14 ▲1.55
Add New Post /wp-admin/post-new.php1,547 ▼12123.23 ▲0.91637.58 ▲0.5328.90 ▼25.17
Media Library /wp-admin/upload.php1,424 ▲364.38 ▲0.1493.69 ▼12.4644.90 ▲0.78

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
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/admin-panel-background-color/src/Admin.php+1059
    Undefined variable: currentUserId
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > 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
      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/ExceptionTest.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === admin-panel-background-color === )
  • Screenshots: A description for screenshot #1 is missing in admin-panel-background-color/assets to your readme.txt
Please take inspiration from this readme.txt

admin-panel-background-color/admin-panel-background-color.php 85% from 13 tests

The primary PHP file in "Admin Panel Background Color" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 188 characters long)
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected9,663 lines of code in 89 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,0651,1344,778
Sass30880962,179
CSS28483221,553
Markdown21380556
JavaScript25629435
HTML18775
JSON30037
XML14123
Bourne Shell14318
YAML1007
make1102

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Please reduce cyclomatic complexity of methods 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
Namespaces1
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods292
▷ Static methods93.08%
▷ Public methods10134.59%
▷ Protected methods18463.01%
▷ Private methods72.40%
Functions9
▷ Named functions444.44%
▷ Anonymous functions555.56%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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.slider.png0.37KB1.58KB0.00%
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.selector.png0.38KB0.39KB0.00%
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.wheel_cursor.png0.38KB0.39KB0.00%
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.wheel_mask.png3.80KB2.08KB▼ 45.35%
admin/js/HSV-HEX-Color-Picker-jQuery/jquery.colorpicker.slider_cursor.png0.45KB0.35KB▼ 21.91%