73% color-scheme-every-theme

Code Review | Color Scheme every Theme

WordPress plugin Color Scheme every Theme scored73%from 54 tests.

About plugin

  • Plugin page: color-scheme-ever...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Feb 26, 2013
  • Latest release: Mar 24, 2013
  • Number of updates: 10
  • Update frequency: every 2.6 days
  • Top authors: danielauener (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

90+ active /14,518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼9.95ms] Passed 4 tests

Analyzing server-side resources used by Color Scheme every Theme
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1040.85 ▼4.71
Dashboard /wp-admin3.38 ▲0.0447.19 ▼16.10
Posts /wp-admin/edit.php3.50 ▲0.1448.53 ▼4.34
Add New Post /wp-admin/post-new.php5.98 ▲0.1084.66 ▼14.64
Media Library /wp-admin/upload.php3.31 ▲0.0839.16 ▼1.24
Color Scheme every Theme /wp-admin/options-general.php?page=cset3.3129.36

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
cset_schemes
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Color Scheme every Theme
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6213.23 ▼1.155.48 ▲3.5639.98 ▼2.07
Dashboard /wp-admin2,229 ▲265.85 ▲0.95104.20 ▼6.9139.44 ▼5.63
Posts /wp-admin/edit.php2,111 ▲112.05 ▲0.0139.53 ▼0.5036.36 ▼2.08
Add New Post /wp-admin/post-new.php1,534 ▼1123.14 ▼0.11668.37 ▲12.6355.09 ▲4.25
Media Library /wp-admin/upload.php1,408 ▲84.26 ▼0.02106.85 ▲0.7843.97 ▼2.12
Color Scheme every Theme /wp-admin/options-general.php?page=cset8282.0725.8627.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • cset_schemes
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=cset
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=cset
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/color-scheme-every-theme/views/color_scheme_control.view.php
    • > /wp-content/plugins/color-scheme-every-theme/views/custom_styles.view.php
    • > /wp-content/plugins/color-scheme-every-theme/views/js_schemes_array.view.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: schemes in wp-content/plugins/color-scheme-every-theme/views/js_schemes_array.view.php on line 2
    • > PHP Notice
      Undefined variable: styles in wp-content/plugins/color-scheme-every-theme/views/custom_styles.view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/color-scheme-every-theme/classes/WP_Customize_Color_Scheme_Control.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/color-scheme-every-theme/views/options.view.php:2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/color-scheme-every-theme/views/color_scheme_control.view.php on line 2
    • > PHP Warning
      implode(): Invalid arguments passed in wp-content/plugins/color-scheme-every-theme/views/js_schemes_array.view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/color-scheme-every-theme/views/settings_link.view.php:1
    • > PHP Notice
      Undefined variable: schemes in wp-content/plugins/color-scheme-every-theme/views/color_scheme_control.view.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/color-scheme-every-theme/classes/WP_Customize_Color_Scheme_Control.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: themes, customization, customizer, color scheme, css

color-scheme-every-theme/color-scheme-every-theme.php Passed 13 tests

This is the main PHP file of "Color Scheme every Theme" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
98 characters long description:
This plugin lets you change the entire color scheme of the current theme via the theme customizer.

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
There were no executable files found in this plugin500 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1111910426
JavaScript18045
CSS16029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.00
▷ Minimum class complexity2.00
▷ Maximum class complexity20.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2191.30%
▷ Protected methods00.00%
▷ Private methods28.70%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin