78% color-changer-elementor

Code Review | Color Change For Elementor

WordPress plugin Color Change For Elementor scored 78% from 54 tests.

About plugin

  • Plugin page: color-changer-ele...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2023
  • Latest release: Jan 31, 2023
  • Number of updates: 5
  • Update frequency: every 2.6 days
  • Top authors: elementinvader (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 321 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.23ms] Passed 4 tests

Server-side resources used by Color Change For Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.17 ▼4.82
Dashboard /wp-admin3.39 ▲0.0945.95 ▲1.24
Posts /wp-admin/edit.php3.49 ▲0.1343.96 ▲0.14
Add New Post /wp-admin/post-new.php6.10 ▲0.2281.80 ▼23.23
Media Library /wp-admin/upload.php3.33 ▲0.1032.80 ▼1.00

Server storage [IO: ▲0.37MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
winter_mvc_active_plugins
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Color Change For Elementor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲17013.60 ▼1.207.79 ▲6.0140.26 ▼6.26
Dashboard /wp-admin2,225 ▲365.80 ▲0.82104.65 ▼20.4039.79 ▼4.87
Posts /wp-admin/edit.php2,111 ▲222.05 ▲0.0138.99 ▲0.6134.35 ▲3.63
Add New Post /wp-admin/post-new.php1,542 ▲918.45 ▼4.76607.85 ▼22.8371.73 ▲15.48
Media Library /wp-admin/upload.php1,410 ▲224.22 ▲0.0597.20 ▼0.0345.83 ▲4.06

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • winter_mvc_active_plugins
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/color-changer-elementor/public/partials/color-changer-elementor-public-display.php
    • > /wp-content/plugins/color-changer-elementor/admin/partials/color-changer-elementor-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/color-changer-elementor/vendor/Winter_MVC/init.php:16

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 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
  • Screenshots: Screenshot #1 (Change colors screenshot) image missing
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === color-changer-elementor === )
The official readme.txt might help

color-changer-elementor/color-changer-elementor.php Passed 13 tests

"Color Change For Elementor" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
123 characters long description:
Plugin will help you Replace / Change Colors defined inside Elementor Editor on all pages automatically in one simple step

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,796 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP248391,3592,371
JavaScript598109265
CSS3248151
HTML1209

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity12.43
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods90
▷ Static methods33.33%
▷ Public methods8190.00%
▷ Protected methods11.11%
▷ Private methods88.89%
Functions85
▷ Named functions85100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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