84% color-your-bar

Code Review | Color Your Bar

WordPress plugin Color Your Bar scored84%from 54 tests.

About plugin

  • Plugin page: color-your-bar
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3
  • WordPress version: 6.3.1
  • First release: Feb 26, 2019
  • Latest release: Aug 20, 2023
  • Number of updates: 14
  • Update frequency: every 116.9 days
  • Top authors: saroyaboy (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

700+ active /5,580 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.16ms] Passed 4 tests

A check of server-side resources used by Color Your Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.77 ▼3.75
Dashboard /wp-admin3.38 ▲0.0749.15 ▼1.77
Posts /wp-admin/edit.php3.49 ▲0.1350.84 ▼0.16
Add New Post /wp-admin/post-new.php5.97 ▲0.0996.42 ▼10.97
Media Library /wp-admin/upload.php3.30 ▲0.0736.69 ▼0.05

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
cyb-ios-full-mode
cyb-post-type
db_upgraded
can_compress_scripts
theysaidso_admin_options
cyb-switch
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Color Your Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲8513.62 ▼0.761.70 ▼0.0642.64 ▼0.16
Dashboard /wp-admin2,252 ▲495.09 ▲0.25107.73 ▲1.5638.15 ▼7.18
Posts /wp-admin/edit.php2,115 ▲152.31 ▲0.3241.80 ▼5.3036.30 ▼0.59
Add New Post /wp-admin/post-new.php1,554 ▲617.86 ▼5.57640.06 ▲22.5736.92 ▼25.80
Media Library /wp-admin/upload.php1,429 ▲294.35 ▲0.0595.66 ▼15.9142.22 ▼7.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • cyb-switch
    • theysaidso_admin_options
    • cyb-post-type
    • widget_recent-comments
    • can_compress_scripts
    • cyb-ios-full-mode
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 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/color-your-bar/color-your-bar.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
8 plugin tags: ios full mode, chrome bar, google chrome mobile, chorme address bar, chrome android...

color-your-bar/color-your-bar.php 85% from 13 tests

The main PHP script in "Color Your Bar" version 2.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

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 detected240 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14256237
JavaScript1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions20
▷ Named functions20100.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