89% formidable-pro-add-color-picker-field

Code Review | Formidable Pro Color Picker

WordPress plugin Formidable Pro Color Picker scored89%from 54 tests.

About plugin

  • Plugin page: formidable-pro-ad...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 5, 2014
  • Latest release: May 8, 2015
  • Number of updates: 24
  • Update frequency: every 63.4 days
  • Top authors: erentzenco (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,375 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.88ms] Passed 4 tests

This is a short check of server-side resources used by Formidable Pro Color Picker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.22 ▲0.97
Dashboard /wp-admin3.32 ▲0.0154.78 ▼9.06
Posts /wp-admin/edit.php3.37 ▲0.0151.40 ▼2.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.00 ▼10.80
Media Library /wp-admin/upload.php3.24 ▲0.0134.83 ▼8.91

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Formidable Pro Color Picker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.321.92 ▲0.3443.87 ▲1.92
Dashboard /wp-admin2,195 ▲215.55 ▼0.0985.67 ▼3.1340.55 ▼1.57
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0734.92 ▼4.2836.43 ▼0.65
Add New Post /wp-admin/post-new.php1,526 ▼923.21 ▲5.16662.63 ▲39.1252.56 ▼13.23
Media Library /wp-admin/upload.php1,403 ▼04.20 ▲0.04100.10 ▼7.3344.18 ▼1.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

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:
  • Screenshots: Add images for these screenshots: #1 (The Advanced Fields section in the Form Builder.), #2 (Form builder screenshot.), #3 (See it in action.)
You can take inspiration from this readme.txt

formidable-pro-add-color-picker-field/formidable-color-picker.php 92% from 13 tests

This is the main PHP file of "Formidable Pro Color Picker" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("formidable-pro-add-color-picker-field.php" instead of "formidable-color-picker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected869 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript113837822
PHP193738
HTML1309

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions4
▷ Named functions4100.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
4 PNG files occupy 0.08MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jscolor/hv.png2.80KB7.32KB0.00%
screenshot-3.png14.87KB12.72KB▼ 14.50%
jscolor/hs.png2.62KB7.54KB0.00%
profieldsplugincolorpicker.png61.86KB16.18KB▼ 73.84%