10% cp-easy-form-builder

Code Review | Form Builder CP

WordPress plugin Form Builder CP scored10%from 54 tests.

About plugin

  • Plugin page: cp-easy-form-builder
  • Plugin version: 1.2.37
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-6.4
  • WordPress version: 6.3.1
  • First release: Aug 17, 2012
  • Latest release: Nov 6, 2023
  • Number of updates: 254
  • Update frequency: every 16.1 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

600+ active /84,602 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/cp-easy-form-builder/cp_easy_form_builder.php+18
    Undefined variable: wpdb

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.03ms] Passed 4 tests

A check of server-side resources used by Form Builder CP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2239.90 ▼2.03
Dashboard /wp-admin3.52 ▲0.2146.04 ▼5.98
Posts /wp-admin/edit.php3.63 ▲0.2749.38 ▼0.33
Add New Post /wp-admin/post-new.php6.12 ▲0.2498.45 ▲4.03
Media Library /wp-admin/upload.php3.44 ▲0.2134.67 ▼3.76
CP Easy Form Builder /wp-admin/options-general.php?page=cp_easy_form_builder3.4833.14
Upgrade /wp-admin/admin.php?page=cp_easy_form_builder_upgrade3.3829.53
CP Easy Form Builder /wp-admin/admin.php?page=cp_easy_form_builder3.4332.20

Server storage [IO: ▲0.63MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 72 new files
Database: 1 new table, 10 new options
New tables
wp_cp_easy_form_settings
New WordPress options
can_compress_scripts
widget_cp_easyform_widget
widget_recent-posts
db_upgraded
widget_theysaidso_widget
installed_form-builder-cp
autoptimize_js_exclude
cp_easyform_data
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Form Builder CP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲5914.32 ▲0.091.77 ▲0.1839.20 ▼6.54
Dashboard /wp-admin2,223 ▲465.57 ▼0.0282.30 ▼19.0340.10 ▼4.22
Posts /wp-admin/edit.php2,134 ▲341.96 ▼0.0746.27 ▲9.1640.05 ▲4.64
Add New Post /wp-admin/post-new.php6,239 ▲4,71319.37 ▼3.80923.75 ▲226.4638.42 ▼39.66
Media Library /wp-admin/upload.php1,434 ▲404.25 ▲0.1097.10 ▼4.4543.04 ▲0.13
CP Easy Form Builder /wp-admin/options-general.php?page=cp_easy_form_builder9912.0339.8930.42
Upgrade /wp-admin/admin.php?page=cp_easy_form_builder_upgrade1,7502.5547.1570.34
CP Easy Form Builder /wp-admin/admin.php?page=cp_easy_form_builder9882.0539.1229.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_cp_easy_form_settings
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • installed_form-builder-cp
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_cp_easyform_widget
    • autoptimize_js_exclude
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 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 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cp-easy-form-builder/cp_easyform_public_int.inc.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cp-easy-form-builder/cp_easy_form_builder.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-easy-form-builder/cp_easyform_admin_int.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-easy-form-builder/cp_admin_int_edition.inc.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cp-easy-form-builder/cp_easyform_admin_int_list.inc.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=cp_easy_form_builder_upgrade
    • > Javascript (severe) in unknown
    https://wordpress.dwbooster.com/TSScript/tab.js 37:11 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Adding fields to the contact form using the form creator), #2 (Editing fields using the form builder), #3 (Contact form processing settings), #4 (Contact form validation settings), #5 (Inserting a contact form into a page), #6 (Built-in captcha image anti-spam protection)
You can take inspiration from this readme.txt

cp-easy-form-builder/cp_easy_form_builder.php 92% from 13 tests

This is the main PHP file of "Form Builder CP" version 1.2.37, 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: It is recommended to name the main PHP file as the plugin slug ("cp-easy-form-builder.php" instead of "cp_easy_form_builder.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
No dangerous file extensions were detected4,626 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51571232,466
PHP8371601,478
CSS445150682

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants47
▷ Global constants47100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
43 PNG files occupy 0.19MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/custom_hsb_b.png1.07KB0.82KB▼ 23.61%
images/colorpicker_rgb_g.png1.04KB0.83KB▼ 20.21%
images/select.png0.49KB0.33KB▼ 33.40%
images/custom_rgb_g.png1.04KB0.80KB▼ 23.67%
images/select2.png0.51KB0.33KB▼ 34.94%