84% admin-bar-color

Code Review | Admin Bar Color

WordPress plugin Admin Bar Color scored 84% from 54 tests.

About plugin

  • Plugin page: admin-bar-color
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3.1
  • WordPress version: 5.9.2
  • First release: Dec 16, 2013
  • Latest release: Oct 27, 2015
  • Number of updates: 9
  • Update frequency: every 75.7 days
  • Top authors: eduardozulian (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 5,899 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.03MB] [CPU: ▼306.77ms] Passed 4 tests

An overview of server-side resources used by Admin Bar Color
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▼0.0460.80 ▲1.95
Dashboard /wp-admin3.42 ▲0.0140.78 ▼5.89
Posts /wp-admin/edit.php3.65 ▲0.0142.26 ▼2.25
Add New Post /wp-admin/post-new.php6.89 ▼0.0895.07 ▼1,213.93
Media Library /wp-admin/upload.php3.30 ▲0.0125.20 ▼5.00

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
wp_admin_color_schemes

Browser metrics Passed 4 tests

Admin Bar Color: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.88 ▼0.167.33 ▲1.292.78 ▲0.65
Dashboard /wp-admin2,895 ▲346.00 ▼0.20114.54 ▼15.69152.52 ▼8.35
Posts /wp-admin/edit.php2,691 ▼33.37 ▲0.1561.70 ▼0.67139.84 ▼2.36
Add New Post /wp-admin/post-new.php1,661 ▼016.33 ▲0.24421.00 ▲28.80163.18 ▲10.36
Media Library /wp-admin/upload.php1,698 ▲35.50 ▲0.00137.28 ▼2.20187.22 ▲7.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • wp_admin_color_schemes

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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 fix the following
  • 1× 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-bar-color/admin-bar-color.php:21

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 issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: color scheme, admin bar, toolbar

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

Analyzing the main PHP file in "Admin Bar Color" version 1.2
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected52 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
Markdown112028
PHP182124

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin