84% contextual-adminbar-color

Code Review | Contextual Adminbar Color

WordPress plugin Contextual Adminbar Color scored 84% from 54 tests.

About plugin

  • Plugin page: contextual-adminb...
  • Plugin version: 0.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2019
  • Latest release: Oct 26, 2022
  • Number of updates: 14
  • Update frequency: every 76.1 days
  • Top authors: audrasjb (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active / 4,822 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼6.90ms] Passed 4 tests

An overview of server-side resources used by Contextual Adminbar Color
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.13 ▼4.94
Dashboard /wp-admin3.31 ▲0.0146.15 ▲1.28
Posts /wp-admin/edit.php3.36 ▲0.0143.43 ▼2.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.41 ▼21.58
Media Library /wp-admin/upload.php3.24 ▲0.0136.80 ▲2.24
Adminbar settings /wp-admin/tools.php?page=contextual-adminbar-color3.2030.81

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Contextual Adminbar Color
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.73 ▲0.431.62 ▼0.1744.31 ▲0.11
Dashboard /wp-admin2,213 ▲254.86 ▼0.2195.83 ▼7.4237.84 ▼2.98
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0434.50 ▼7.2737.07 ▲1.64
Add New Post /wp-admin/post-new.php1,517 ▼1117.60 ▼0.72657.47 ▼8.6352.64 ▼0.39
Media Library /wp-admin/upload.php1,386 ▼24.21 ▲0.0493.76 ▼20.9643.00 ▼4.20
Adminbar settings /wp-admin/tools.php?page=contextual-adminbar-color1,1301.7127.2329.02

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

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 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contextual-adminbar-color/contextual-adminbar-color.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: staging, environments, production, scheme, environment...

contextual-adminbar-color/contextual-adminbar-color.php 92% from 13 tests

Analyzing the main PHP file in "Contextual Adminbar Color" version 0.3.1
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.3" instead of "5.4")

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
Good job! No executable or dangerous file extensions detected1,306 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS614472822
PHP33621484

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
9 PNG files occupy 0.48MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png115.31KB34.04KB▼ 70.48%
images/schemes/scheme-red.png0.79KB0.15KB▼ 81.53%
assets/screenshot-3.png214.98KB84.13KB▼ 60.86%
images/schemes/scheme-darkgray.png0.78KB0.15KB▼ 81.15%
images/schemes/scheme-green.png0.80KB0.15KB▼ 80.88%