84% d2l-wp-color-picker-enhancement

Code Review | WordPress Color Picker Enhancement

WordPress plugin WordPress Color Picker Enhancement scored84%from 54 tests.

About plugin

  • Plugin page: d2l-wp-color-pick...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.4
  • WordPress version: 6.3.1
  • First release: Jan 28, 2018
  • Latest release: Mar 7, 2020
  • Number of updates: 17
  • Update frequency: every 45.2 days
  • Top authors: raviry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,127 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.61ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Color Picker Enhancement
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.81 ▲0.56
Dashboard /wp-admin3.33 ▲0.0346.56 ▲2.39
Posts /wp-admin/edit.php3.38 ▲0.0341.20 ▼8.75
Add New Post /wp-admin/post-new.php5.91 ▲0.0376.39 ▼20.23
Media Library /wp-admin/upload.php3.26 ▲0.0333.11 ▲2.00
WP ColorPicker /wp-admin/options-general.php?page=d2l-wp-colorpicker3.2630.99

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 24 new options
New WordPress options
d2l_color_palettes17
d2l_color_palettes16
d2l_color_palettes14
d2l_color_palettes6
widget_recent-posts
d2l_color_palettes1
widget_recent-comments
d2l_color_palettes11
theysaidso_admin_options
d2l_color_palettes7
...

Browser metrics Passed 4 tests

WordPress Color Picker Enhancement: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.75 ▲0.111.74 ▲0.0344.24 ▼0.17
Dashboard /wp-admin2,212 ▲245.89 ▲1.02109.91 ▲9.7141.36 ▼3.05
Posts /wp-admin/edit.php2,095 ▲61.98 ▼0.0733.21 ▼8.2932.66 ▼1.72
Add New Post /wp-admin/post-new.php1,522 ▼823.29 ▲5.29622.23 ▼17.3948.22 ▼7.52
Media Library /wp-admin/upload.php1,397 ▲94.22 ▲0.04100.52 ▲2.6343.68 ▼2.05
WP ColorPicker /wp-admin/options-general.php?page=d2l-wp-colorpicker1,5963.3484.9528.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 24 options in the database
    • d2l_color_palettes5
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • d2l_color_palettes3
    • d2l_color_palettes14
    • d2l_color_palettes2
    • db_upgraded
    • d2l_color_palettes10
    • d2l_color_palettes13
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_page_title() in wp-content/plugins/d2l-wp-color-picker-enhancement/includes/d2l-cp-settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes: The official readme.txt is a good inspiration

d2l-wp-color-picker-enhancement/d2l-wp-colorpicker.php 92% from 13 tests

Analyzing the main PHP file in "WordPress Color Picker Enhancement" version 1.0.1
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("d2l-wp-color-picker-enhancement.php" instead of "d2l-wp-colorpicker.php")

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
No dangerous file extensions were detected167 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21517165
CSS1001
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected