78% background-color-changer

Code Review | Background Color Changer

WordPress plugin Background Color Changer scored 78% from 54 tests.

About plugin

  • Plugin page: background-color-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 17, 2023
  • Latest release: Sep 23, 2023
  • Number of updates: 3
  • Update frequency: every 3.3 days
  • Top authors: raj009 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 58 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.10ms] Passed 4 tests

An overview of server-side resources used by Background Color Changer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.01 ▼4.41
Dashboard /wp-admin3.32 ▲0.0240.81 ▼6.13
Posts /wp-admin/edit.php3.37 ▲0.0145.72 ▼0.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0176.81 ▼13.08
Media Library /wp-admin/upload.php3.24 ▲0.0135.74 ▼0.78

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Background Color Changer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.26 ▼1.124.03 ▲2.3139.42 ▼12.27
Dashboard /wp-admin2,206 ▲545.87 ▲0.26111.15 ▲0.3443.26 ▼3.91
Posts /wp-admin/edit.php2,092 ▲32.03 ▼0.0238.71 ▲2.5434.31 ▼2.93
Add New Post /wp-admin/post-new.php1,537 ▲1823.27 ▼0.04669.82 ▲25.0853.64 ▲0.09
Media Library /wp-admin/upload.php1,391 ▲94.19 ▲0.01100.02 ▲3.8041.05 ▼0.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/background-color-changer/index.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/background-color-changer/background-color-changer.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: The official readme.txt is a good inspiration

background-color-changer/background-color-changer.php 92% from 13 tests

The entry point to "Background Color Changer" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin59 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2142459

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions4
▷ Named functions4100.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