90% image-color-palette

Code Review | Image Color Palette

WordPress plugin Image Color Palette scored90%from 54 tests.

About plugin

  • Plugin page: image-color-palette
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.7
  • WordPress version: 6.3.1
  • First release: Sep 6, 2018
  • Latest release: May 8, 2021
  • Number of updates: 29
  • Update frequency: every 33.7 days
  • Top authors: melonpan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /2,205 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Image Color Palette
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.11 ▼12.01
Dashboard /wp-admin3.32 ▼0.0342.88 ▼20.31
Posts /wp-admin/edit.php3.37 ▲0.0145.65 ▼3.49
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.92 ▲0.78
Media Library /wp-admin/upload.php3.24 ▲0.0136.06 ▲4.89

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Image Color Palette
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.051.78 ▼0.2643.13 ▼4.12
Dashboard /wp-admin2,206 ▲185.80 ▼0.01103.02 ▼11.6535.92 ▼6.52
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.1340.93 ▲4.6334.69 ▲1.15
Add New Post /wp-admin/post-new.php1,541 ▲2723.71 ▲6.17594.69 ▼110.6861.35 ▲8.98
Media Library /wp-admin/upload.php1,388 ▼04.33 ▲0.1297.04 ▼7.8842.73 ▼2.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
3 plugin tags: color, gutenberg, blocks

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

"Image Color Palette" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
55 characters long description:
Create a color palette based on the colors of an image.

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 plugin43 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP162041
CSS1001
JavaScript1051

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin