83% admin-color-bar

Code Review | Admin Color Bar

WordPress plugin Admin Color Bar scored83%from 54 tests.

About plugin

  • Plugin page: admin-color-bar
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0
  • WordPress version: 6.3.1
  • First release: Jun 2, 2017
  • Latest release: Oct 22, 2018
  • Number of updates: 3
  • Update frequency: every 169.0 days
  • Top authors: davejesch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,679 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.81ms] Passed 4 tests

Analyzing server-side resources used by Admin Color Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.45 ▼4.65
Dashboard /wp-admin3.37 ▲0.0247.41 ▼17.97
Posts /wp-admin/edit.php3.48 ▲0.1348.73 ▼4.41
Add New Post /wp-admin/post-new.php5.95 ▲0.0688.70 ▼12.22
Media Library /wp-admin/upload.php3.29 ▲0.0642.56 ▲5.43
Admin Color Bar /wp-admin/options-general.php?page=acb-settings3.2633.62

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/admin-color-bar/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Admin Color Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6613.56 ▼1.031.70 ▼0.1242.63 ▲0.50
Dashboard /wp-admin2,215 ▲95.85 ▲0.94109.17 ▲5.9738.64 ▼0.96
Posts /wp-admin/edit.php2,109 ▲62.05 ▲0.0343.08 ▲4.0935.40 ▲0.63
Add New Post /wp-admin/post-new.php1,537 ▲617.34 ▼6.18669.78 ▼46.0356.23 ▼4.11
Media Library /wp-admin/upload.php1,397 ▼64.25 ▼0.01110.75 ▲4.8147.14 ▲0.33
Admin Color Bar /wp-admin/options-general.php?page=acb-settings1,1182.2759.5731.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-color-bar/admin-color-bar.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-color-bar/admin-color-bar-admin.php:15

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Plugin page.) image missing
You can look at the official readme.txt

admin-color-bar/admin-color-bar.php 92% from 13 tests

The entry point to "Admin Color Bar" version 1.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/language" does not exist

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin309 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP25071271
JSON10016
Markdown111014
JavaScript1028

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity12.50
▷ Minimum class complexity4.00
▷ Maximum class complexity21.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods316.67%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.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
PNG images were not found in this plugin