88% chrome-theme-color-changer

Code Review | Chrome Theme Color Changer

WordPress plugin Chrome Theme Color Changer scored 88% from 54 tests.

About plugin

  • Plugin page: chrome-theme-colo...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.4.2
  • WordPress version: 5.8.1
  • First release: Apr 7, 2016
  • Latest release: Jul 24, 2016
  • Number of updates: 13
  • Update frequency: every 8.4 days
  • Top authors: Potato4d (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 3,774 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼144.22ms] Passed 4 tests

This is a short check of server-side resources used by Chrome Theme Color Changer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0336.56 ▲0.19
Dashboard /wp-admin3.08 ▲0.0348.93 ▼4.62
Posts /wp-admin/edit.php3.14 ▲0.0348.19 ▼4.01
Add New Post /wp-admin/post-new.php5.44 ▲0.01101.20 ▼568.45
Media Library /wp-admin/upload.php3.03 ▲0.0335.04 ▲1.01
Theme color /wp-admin/options-general.php?page=chrome-theme-color-changer3.0028.98

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chrome Theme Color Changer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13615.88 ▲0.2910.68 ▼4.3156.54 ▼2.17
Dashboard /wp-admin2,975 ▲415.93 ▼0.08157.50 ▼7.83116.68 ▼2.83
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0065.94 ▼7.8589.83 ▲0.70
Add New Post /wp-admin/post-new.php1,686 ▲318.47 ▼0.23397.67 ▼32.28107.60 ▼3.84
Media Library /wp-admin/upload.php1,812 ▲55.01 ▼0.03162.23 ▲2.05117.60 ▲3.33
Theme color /wp-admin/options-general.php?page=chrome-theme-color-changer1,0622.3353.2659.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chrome-theme-color-changer/chrome-theme-color-changer.php:117
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/chrome-theme-color-changer/res/templates/onerror.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/chrome-theme-color-changer/res/templates/updated.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/chrome-theme-color-changer/res/templates/form.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=chrome-theme-color-changer
    • > Network (severe)
    wp-content/plugins/chrome-theme-color-changer/res/lib/jscolor.min.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: meta, admin

chrome-theme-color-changer/chrome-theme-color-changer.php 92% from 13 tests

"Chrome Theme Color Changer" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/res/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
Good job! No executable or dangerous file extensions detected1,639 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript53451731,442
PHP42410114
JSON10024
Sass15023
CSS10115
YAML15014
Markdown1307

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods866.67%
▷ Protected methods00.00%
▷ Private methods433.33%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected