89% cf7-color-picker

Code Review | Color Picker for Contact Form 7

WordPress plugin Color Picker for Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: cf7-color-picker
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 22, 2017
  • Latest release: Apr 20, 2023
  • Number of updates: 27
  • Update frequency: every 76.6 days
  • Top authors: Florent73 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /3,917 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.08MB] [CPU: ▼8.29ms] Passed 4 tests

A check of server-side resources used by Color Picker for Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.36 ▼3.94
Dashboard /wp-admin3.40 ▲0.0546.28 ▼13.50
Posts /wp-admin/edit.php3.51 ▲0.1550.88 ▲1.06
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.49 ▼16.77
Media Library /wp-admin/upload.php3.32 ▲0.0938.70 ▲4.11

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Color Picker for Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲8914.45 ▲0.073.06 ▲1.4539.05 ▼1.27
Dashboard /wp-admin2,209 ▲245.85 ▼0.05103.40 ▲0.3137.86 ▼5.47
Posts /wp-admin/edit.php2,089 ▼32.06 ▲0.0838.59 ▼2.8034.10 ▼3.10
Add New Post /wp-admin/post-new.php1,533 ▲1323.27 ▲0.13641.27 ▲1.2760.64 ▲4.91
Media Library /wp-admin/upload.php1,385 ▼64.23 ▲0.00103.62 ▲4.2844.41 ▲0.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • cf7-color-picker

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

cf7-color-picker/contact-form-7-color-picker.php 92% from 13 tests

"Color Picker for Contact Form 7" version 0.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-color-picker.php" instead of "contact-form-7-color-picker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,747 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33271701,358
PHP8147424342
PO File17015342
CSS1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity6.40
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2480.00%
▷ Protected methods00.00%
▷ Private methods620.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin