84% change-background-color-from-bright-to-dark

Code Review | Change background color from bright to dark

WordPress plugin Change background color from bright to dark scored84%from 54 tests.

About plugin

  • Plugin page: change-background...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 30, 2022
  • Latest release: Feb 25, 2023
  • Number of updates: 4
  • Update frequency: every 83.3 days
  • Top authors: haghs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /265 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Change background color from bright to dark
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.10 ▲2.44
Dashboard /wp-admin3.31 ▲0.0145.55 ▼4.05
Posts /wp-admin/edit.php3.36 ▲0.0145.25 ▼1.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.21 ▼14.20
Media Library /wp-admin/upload.php3.23 ▲0.0034.40 ▼0.67

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Change background color from bright to dark
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.21 ▼1.091.73 ▼0.1940.27 ▼1.67
Dashboard /wp-admin2,206 ▲145.87 ▲0.93107.82 ▼5.9339.41 ▼1.94
Posts /wp-admin/edit.php2,092 ▲31.99 ▲0.0238.57 ▲1.9334.37 ▼2.10
Add New Post /wp-admin/post-new.php1,514 ▼517.50 ▼5.71666.25 ▲51.0055.84 ▲5.96
Media Library /wp-admin/upload.php1,385 ▼64.21 ▼0.0496.53 ▼3.8941.56 ▼2.74

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/change-background-color-from-bright-to-dark/ChangeBackgroundColorFromBrightToDark.php:138

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: change background color

change-background-color-from-bright-to-dark/ChangeBackgroundColorFromBrightToDark.php 92% from 13 tests

The main PHP file in "Change background color from bright to dark" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("change-background-color-from-bright-to-dark.php" instead of "ChangeBackgroundColorFromBrightToDark.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin87 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1421087

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin