90% color-palette-block

Code Review | Color Palette

WordPress plugin Color Palette scored90%from 54 tests.

About plugin

  • Plugin page: color-palette-block
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 29, 2018
  • Latest release: Jun 30, 2018
  • Number of updates: 6
  • Update frequency: every 15.5 days
  • Top authors: AjitBohra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,250 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.03MB] [CPU: ▼6.88ms] Passed 4 tests

This is a short check of server-side resources used by Color Palette
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.48 ▼1.03
Dashboard /wp-admin3.33 ▲0.0243.10 ▼5.49
Posts /wp-admin/edit.php3.38 ▲0.0246.56 ▼5.38
Add New Post /wp-admin/post-new.php6.98 ▲1.1091.16 ▼15.63
Media Library /wp-admin/upload.php3.25 ▲0.0233.34 ▼0.53

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Color Palette
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲17518.66 ▲4.24132.57 ▲130.9340.37 ▼8.73
Dashboard /wp-admin2,203 ▲125.84 ▼0.05100.32 ▲0.5039.16 ▼3.44
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0239.08 ▼2.4436.95 ▲1.86
Add New Post /wp-admin/post-new.php6,261 ▲4,73122.91 ▲4.79939.13 ▲313.9946.32 ▼9.10
Media Library /wp-admin/upload.php1,382 ▼64.19 ▲0.02104.35 ▲8.3444.04 ▼0.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: palette, color, gutenberg, block

color-palette-block/color-palette-block.php 92% from 13 tests

The main PHP script in "Color Palette" version 1.1.0 is automatically included on every request by WordPress
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 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected91 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP1168980
JavaScript1047
CSS4004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods350.00%
▷ Protected methods00.00%
▷ Private methods350.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected