84% custom-colors

Code Review | Custom Colors

WordPress plugin Custom Colors scored84%from 54 tests.

About plugin

  • Plugin page: custom-colors
  • Plugin version: 1.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.5
  • WordPress version: 6.3.1
  • First release: Apr 25, 2016
  • Latest release: Sep 8, 2016
  • Number of updates: 9
  • Update frequency: every 15.0 days
  • Top authors: seosbg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /3,273 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲3.17ms] Passed 4 tests

This is a short check of server-side resources used by Custom Colors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0744.38 ▲1.98
Dashboard /wp-admin3.37 ▲0.0645.74 ▼0.02
Posts /wp-admin/edit.php3.42 ▲0.0649.93 ▲6.88
Add New Post /wp-admin/post-new.php5.95 ▲0.0691.48 ▲4.09
Media Library /wp-admin/upload.php3.29 ▲0.0635.76 ▲6.63

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom Colors
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲2414.76 ▲0.211.90 ▼0.3554.19 ▲7.59
Dashboard /wp-admin2,216 ▲395.64 ▲0.0584.19 ▼21.1974.51 ▲30.93
Posts /wp-admin/edit.php2,124 ▲271.95 ▼0.0441.71 ▲5.7937.19 ▲2.50
Add New Post /wp-admin/post-new.php1,556 ▲2823.11 ▼0.03714.80 ▲38.3054.79 ▲0.99
Media Library /wp-admin/upload.php1,412 ▲124.22 ▲0.08100.14 ▼36.2267.40 ▲14.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-colors/custom-colors.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #1 (Admin Panel view of submitted form data.)
You can take inspiration from this readme.txt

custom-colors/custom-colors.php Passed 13 tests

The primary PHP file in "Custom Colors" version 1.13 is used by WordPress to initiate all plugin functionality
83 characters long description:
Custom Colors WordPress plugin allows you to change all basic colors in your theme.

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
There were no executable files found in this plugin272 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15211217
PO File1161755

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions7
▷ Named functions7100.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
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png24.45KB9.05KB▼ 62.99%
images/icon.png1.58KB1.43KB▼ 9.69%
images/logo.png11.25KB4.39KB▼ 60.99%