74% color-palette

Code Review | Color Palette

WordPress plugin Color Palette scored74%from 54 tests.

About plugin

  • Plugin page: color-palette
  • Plugin version: 4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Sep 18, 2023
  • Number of updates: 33
  • Update frequency: every 88.9 days
  • Top authors: thatdevgirl (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active /9,085 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.19MB] [CPU: ▼41.22ms] Passed 4 tests

A check of server-side resources used by Color Palette
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.79 ▼0.6714.62 ▼22.07
Dashboard /wp-admin2.83 ▼0.5115.27 ▼42.40
Posts /wp-admin/edit.php2.83 ▼0.5217.17 ▼30.27
Add New Post /wp-admin/post-new.php2.83 ▼3.0616.56 ▼70.14
Media Library /wp-admin/upload.php2.83 ▼0.4015.04 ▼18.92

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Color Palette: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲16513.96 ▼0.339.65 ▲8.0743.68 ▲7.26
Dashboard /wp-admin2,206 ▲175.91 ▲0.95106.46 ▼2.3337.05 ▼2.24
Posts /wp-admin/edit.php2,089 ▲32.03 ▲0.0239.14 ▲2.0336.05 ▲2.52
Add New Post /wp-admin/post-new.php1,686 ▲16724.75 ▲1.46640.87 ▲7.2854.91 ▲0.63
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.0299.02 ▲0.5639.80 ▼4.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function register_block_script_handle was called incorrectly. The asset file (wp-content/plugins/color-palette/source/blocks/color/../../../build/color-palette.min.asset.php) for the "script" defined in "tdg/color" block definition is missing. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ThatDevGirl\\ColorPalette\\add_action() in wp-content/plugins/color-palette/source/blocks/color/register.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ThatDevGirl\\ColorPalette\\add_action() in wp-content/plugins/color-palette/inc/setup.php:15

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: colors, palette, visual identity, block, branding

color-palette/color-palette.php Passed 13 tests

Analyzing the main PHP file in "Color Palette" version 4.3
115 characters long description:
This WordPress plugin adds a color palette block to the post editor, to be used for branding and style guide pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin2,437 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript161471151,916
Sass6711258
PHP363143161
JSON2130100
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity4.50
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods857.14%
▷ Protected methods00.00%
▷ Private methods642.86%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin