84% iris-color-picker-enhancer

Code Review | Iris Color Picker Enhancer

WordPress plugin Iris Color Picker Enhancer scored84%from 54 tests.

About plugin

  • Plugin page: iris-color-picker...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.8.1
  • WordPress version: 6.3.1
  • First release: May 25, 2016
  • Latest release: Sep 8, 2017
  • Number of updates: 13
  • Update frequency: every 36.4 days
  • Top authors: EnigmaWeb (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /2,856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.40ms] Passed 4 tests

Server-side resources used by Iris Color Picker Enhancer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.18 ▼1.64
Dashboard /wp-admin3.35 ▲0.0048.42 ▼11.86
Posts /wp-admin/edit.php3.40 ▲0.0448.43 ▼2.65
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.26 ▼13.34
Media Library /wp-admin/upload.php3.27 ▲0.0438.52 ▼1.75
Iris Color Picker Enhancer /wp-admin/options-general.php?page=iris-color-picker-enhancer3.2630.58

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 15 new options
New WordPress options
icpe_color_palettes5
icpe_color_palettes7
widget_recent-comments
db_upgraded
icpe_color_alpha
can_compress_scripts
widget_theysaidso_widget
icpe_color_palettes1
icpe_color_palettes2
icpe_color_palettes3
...

Browser metrics Passed 4 tests

A check of browser resources used by Iris Color Picker Enhancer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲8614.43 ▼0.291.99 ▼0.5746.28 ▼6.31
Dashboard /wp-admin2,226 ▲465.80 ▲0.15102.62 ▲13.4841.91 ▼2.16
Posts /wp-admin/edit.php2,139 ▲392.33 ▲0.3339.91 ▼1.0834.25 ▼1.66
Add New Post /wp-admin/post-new.php1,554 ▲2823.60 ▼0.09690.73 ▲42.4437.34 ▼48.18
Media Library /wp-admin/upload.php1,428 ▲284.54 ▲0.34108.04 ▲6.6448.45 ▲4.82
Iris Color Picker Enhancer /wp-admin/options-general.php?page=iris-color-picker-enhancer1,2572.7760.8442.70

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 14 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • icpe_color_palettes7
    • icpe_color_palettes4
    • widget_theysaidso_widget
    • icpe_color_alpha
    • widget_recent-posts
    • icpe_color_palettes3
    • ...

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/iris-color-picker-enhancer/includes/icpe-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/iris-color-picker-enhancer/iris-color-picker-enhancer.php:18

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: color swatches, iris, color palette, iris color picker, alpha...

iris-color-picker-enhancer/iris-color-picker-enhancer.php Passed 13 tests

The primary PHP file in "Iris Color Picker Enhancer" version 1.1 is used by WordPress to initiate all plugin functionality
61 characters long description:
Customise the default color palette used by Iris Color Picker

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected497 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP27324403
CSS115393
JavaScript10111

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png21.54KB11.92KB▼ 44.66%
screenshot-1.png53.77KB15.45KB▼ 71.27%