62% lead-form-builder

Code Review | Responsive Contact Form Builder & Lead Generation Plugin

WordPress plugin Responsive Contact Form Builder & Lead Generation Plugin scored62%from 54 tests.

About plugin

  • Plugin page: lead-form-builder
  • Plugin version: 1.8.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Jun 7, 2016
  • Latest release: Nov 7, 2023
  • Number of updates: 106
  • Update frequency: every 25.6 days
  • Top authors: themehunk (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10,000+ active /660,500 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.66MB] [CPU: ▲5.23ms] Passed 4 tests

A check of server-side resources used by Responsive Contact Form Builder & Lead Generation Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6043.46 ▲2.26
Dashboard /wp-admin4.03 ▲0.7256.93 ▲3.62
Posts /wp-admin/edit.php4.08 ▲0.7259.62 ▲9.01
Add New Post /wp-admin/post-new.php6.55 ▲0.6692.91 ▲6.02
Media Library /wp-admin/upload.php3.89 ▲0.6650.06 ▲16.05
ThemeHunk /wp-admin/admin.php?page=themehunk-plugins3.8845.57
Add Forms /wp-admin/admin.php?page=add-new-form3.8744.98
Premium Version /wp-admin/admin.php?page=pro-form-leads3.8944.00
View Leads /wp-admin/admin.php?page=all-form-leads3.8747.23
Lead Form Builder /wp-admin/admin.php?page=wplf-plugin-menu3.8745.37

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 106 new files
Database: 5 new tables, 7 new options
New tables
wp_lead_form_extension
wp_lead_form
wp_th_popup
wp_lead_form_options
wp_lead_form_data
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_lfb-form-builder
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Responsive Contact Form Builder & Lead Generation Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20613.94 ▼0.3012.02 ▲10.3741.73 ▼5.02
Dashboard /wp-admin2,261 ▲845.65 ▲0.0791.46 ▼10.2982.89 ▲39.47
Posts /wp-admin/edit.php2,181 ▲812.01 ▲0.0438.66 ▲1.9940.57 ▲3.20
Add New Post /wp-admin/post-new.php1,668 ▲13723.03 ▲0.22687.94 ▼3.80197.80 ▲153.08
Media Library /wp-admin/upload.php1,475 ▲754.14 ▼0.0399.03 ▼1.1077.71 ▲35.18
ThemeHunk /wp-admin/admin.php?page=themehunk-plugins1,2431.8334.0353.97
Add Forms /wp-admin/admin.php?page=add-new-form1,4492.5349.4066.73
Premium Version /wp-admin/admin.php?page=pro-form-leads1,2852.5641.9759.81
View Leads /wp-admin/admin.php?page=all-form-leads1,1312.5834.5846.98
Lead Form Builder /wp-admin/admin.php?page=wplf-plugin-menu1,8132.5835.2254.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie tables detected upon uninstall: 5 tables
    • wp_th_popup
    • wp_lead_form_extension
    • wp_lead_form
    • wp_lead_form_options
    • wp_lead_form_data
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_lfb-form-builder
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/lead-form-builder/notify/notify-html.php
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lead-form-builder/inc/themehunk-menu/th-option/sidebar.php:4
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin-install.php): failed to open stream: No such file or directory in wp-content/plugins/lead-form-builder/inc/themehunk-menu/admin-menu.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/lead-form-builder/inc/themehunk-menu/admin-menu.php:4
    • > PHP Warning
      include_once(): Failed opening 'THEMEHUNK_PDIRth-option/header.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/lead-form-builder/inc/themehunk-menu/th-option/tab-html.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lead-form-builder/inc/options/option.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/lead-form-builder/inc/header.php:24
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lead-form-builder/inc/themehunk-menu/admin-menu.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/lead-form-builder/inc/themehunk-menu/th-option/header.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/lead-form-builder/inc/themehunk-menu/plugins-list.php:4
    • > PHP Notice
      Undefined variable: theme in wp-content/plugins/lead-form-builder/notify/notify-html.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wplf-plugin-menu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'editor')" "TypeError: Cannot read properties of undefined (reading 'editor')\n at media_upload (/wp-content/plugins/lead-form-builder/js/upload.js?ver=1.8.6:5:42)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/lead-form-builder/js/upload.js?ver=1.8.6:36:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wplf-plugin-menu
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'editor')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (21 tag instead of maximum 10)
You can take inspiration from this readme.txt

lead-form-builder/lead-form-builder.php 92% from 13 tests

The primary PHP file in "Responsive Contact Form Builder & Lead Generation Plugin" version 1.8.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 465 characters long)

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 detected19,090 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
CSS91511395,894
PHP288383174,761
SVG130113,219
Sass1434341,768
LESS1434441,758
JavaScript64296561,690

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity20.92
▷ Minimum class complexity2.00
▷ Maximum class complexity70.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods123
▷ Static methods10.81%
▷ Public methods11492.68%
▷ Protected methods97.32%
▷ Private methods00.00%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants73
▷ Global constants7095.89%
▷ Class constants34.11%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.29MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/themehunk-menu/th-option/assets/images/th-shop-mania.png34.78KB11.98KB▼ 65.56%
images/icon.png8.40KB0.67KB▼ 91.99%
images/big-store-1.png27.35KB28.49KB0.00%
notify/assets/images/th-shop-mania.png34.78KB11.98KB▼ 65.56%
inc/themehunk-menu/th-option/assets/images/icon.png14.32KB7.45KB▼ 47.95%