94% admin-color-bar

Code Review | Admin Color Bar

WordPress plugin Admin Color Bar scored 94% 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: 5.9.2
  • 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

40+ active / 1,159 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼303.75ms] Passed 4 tests

Server-side resources used by Admin Color Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0153.49 ▲4.49
Dashboard /wp-admin3.44 ▲0.0338.43 ▲6.16
Posts /wp-admin/edit.php3.66 ▲0.0237.11 ▼2.52
Add New Post /wp-admin/post-new.php6.90 ▼0.0799.39 ▼1,218.77
Media Library /wp-admin/upload.php3.31 ▲0.0224.99 ▲1.81
Admin Color Bar /wp-admin/options-general.php?page=acb-settings3.2924.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Admin Color Bar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,776 ▲2216.01 ▲0.095.81 ▼0.132.24 ▼0.67
Dashboard /wp-admin2,898 ▲376.09 ▼0.02117.49 ▼12.94153.19 ▼10.48
Posts /wp-admin/edit.php2,698 ▲43.24 ▲0.0061.33 ▼1.77141.80 ▲0.28
Add New Post /wp-admin/post-new.php1,644 ▼1720.32 ▲4.37383.73 ▼26.04154.09 ▲0.76
Media Library /wp-admin/upload.php1,699 ▲15.55 ▲0.06139.90 ▲7.30187.05 ▲7.76
Admin Color Bar /wp-admin/options-general.php?page=acb-settings1,5233.5176.66139.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-color-bar/admin-color-bar-admin.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-color-bar/admin-color-bar.php:25

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Plugin page.)
Please take inspiration from this readme.txt

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

The main PHP file in "Admin Color Bar" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/language" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin309 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods316.67%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin