84% colors

Code Review | Colors

WordPress plugin Colors scored84%from 54 tests.

About plugin

  • Plugin page: colors
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 19, 2021
  • Latest release: Aug 23, 2021
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: bradparbs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,623 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
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.87ms] Passed 4 tests

Server-side resources used by Colors
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.48 ▼10.61
Dashboard /wp-admin3.31 ▲0.0049.05 ▼0.34
Posts /wp-admin/edit.php3.36 ▲0.0051.50 ▲0.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.49 ▼16.57
Media Library /wp-admin/upload.php3.23 ▲0.0039.84 ▲0.73

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Colors
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2813.90 ▼0.382.15 ▲0.0345.66 ▲2.21
Dashboard /wp-admin2,198 ▲215.61 ▼0.0982.15 ▼6.7443.47 ▲2.39
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0340.85 ▲0.8636.64 ▼3.48
Add New Post /wp-admin/post-new.php1,526 ▼023.05 ▼0.29648.19 ▲23.7649.93 ▼11.40
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.00111.26 ▲4.7045.96 ▼1.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Colors\\add_action() in wp-content/plugins/colors/colors.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: dashboard, admin, color, color-schemes

colors/colors.php 92% from 13 tests

The entry point to "Colors" version 1.1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14158

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
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
Namespaces1
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin