56% wpforms-lite

Code Review | Contact Form by WPForms - Drag & Drop Form Builder for WordPress

WordPress plugin Contact Form by WPForms - Drag & Drop Form Builder for WordPress scored56%from 54 tests.

About plugin

  • Plugin page: wpforms-lite
  • Plugin version: 1.8.5.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Mar 14, 2016
  • Latest release: Nov 28, 2023
  • Number of updates: 298
  • Update frequency: every 9.5 days
  • Top authors: jaredatch (75.84%)slaFFik (21.81%)smub (2.68%)

Code review

54 tests

User reviews

13515 reviews

Install metrics

5,000,000+ active /176,157,669 total downloads

Benchmarks

Plugin footprint 63% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲10.16MB] [CPU: ▲78.23ms] 25% from 4 tests

This is a short check of server-side resources used by Contact Form by WPForms - Drag & Drop Form Builder for WordPress
Please have a look at the following items
  • RAM: Try to keep total memory usage under 10MB (currently 14.19MB on /wp-admin/admin.php?page=wpforms-smtp)
  • CPU: Total CPU usage should be kept under 500.00ms (currently 577.83ms on /wp-admin/admin.php?page=wpforms-templates)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 10.16MB on /wp-admin/admin.php?page=wpforms-smtp)
PageMemory (MB)CPU Time (ms)
Home /12.59 ▲9.1296.45 ▲52.37
Dashboard /wp-admin13.88 ▲10.53134.34 ▲75.75
Posts /wp-admin/edit.php13.90 ▲10.54143.23 ▲94.30
Add New Post /wp-admin/post-new.php16.43 ▲10.54190.24 ▲90.48
Media Library /wp-admin/upload.php13.69 ▲10.46148.04 ▲114.64
All Forms /wp-admin/admin.php?page=wpforms-overview14.63388.13
Community /wp-admin/admin.php?page=wpforms-community14.26205.91
Settings /wp-admin/admin.php?page=wpforms-settings14.61116.60
Addons /wp-admin/admin.php?page=wpforms-addons14.22129.31
Payments NEW! /wp-admin/admin.php?page=wpforms-payments14.61141.14
Entries /wp-admin/admin.php?page=wpforms-entries14.20117.84
About Us /wp-admin/admin.php?page=wpforms-about14.18113.68
Form Templates /wp-admin/admin.php?page=wpforms-templates21.74577.83
Tools /wp-admin/admin.php?page=wpforms-tools14.75124.90
SMTP /wp-admin/admin.php?page=wpforms-smtp14.19113.50

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,501 new files
Database: 7 new tables, 18 new options
New tables
wp_wpforms_payment_meta
wp_wpforms_payments
wp_actionscheduler_actions
wp_wpforms_tasks_meta
wp_actionscheduler_groups
wp_actionscheduler_logs
wp_actionscheduler_claims
New WordPress options
wpforms_version_lite
widget_recent-posts
wpforms_activated
widget_wpforms-widget
action_scheduler_lock_async-request-runner
schema-ActionScheduler_LoggerSchema
widget_recent-comments
wpforms_versions_lite
action_scheduler_hybrid_store_demarkation
wpforms_admin_notices
...

Browser metrics 75% from 4 tests

An overview of browser requirements for Contact Form by WPForms - Drag & Drop Form Builder for WordPress
Please improve the following
  • Nodes: For the best user experience, please reduce the number of DOM nodes under 25,000 (currently 51,777 on /wp-admin/admin.php?page=wpforms-templates)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,028 ▲28113.96 ▼0.381.66 ▼0.0440.24 ▼3.36
Dashboard /wp-admin2,385 ▲2085.30 ▼0.23107.70 ▲21.4579.65 ▲43.22
Posts /wp-admin/edit.php2,234 ▲1372.05 ▲0.0241.10 ▲0.4735.64 ▼1.42
Add New Post /wp-admin/post-new.php1,770 ▲24422.27 ▼1.26551.86 ▼93.2237.77 ▼12.35
Media Library /wp-admin/upload.php1,519 ▲1194.20 ▼0.0999.81 ▲3.7446.84 ▲6.63
All Forms /wp-admin/admin.php?page=wpforms-overview1,5733.6453.8582.55
Community /wp-admin/admin.php?page=wpforms-community1,4213.4250.5268.74
Settings /wp-admin/admin.php?page=wpforms-settings1,7213.7356.42103.73
Addons /wp-admin/admin.php?page=wpforms-addons2,7473.7552.93129.83
Payments NEW! /wp-admin/admin.php?page=wpforms-payments1,5043.5052.1175.01
Entries /wp-admin/admin.php?page=wpforms-entries2,0973.5453.4481.50
About Us /wp-admin/admin.php?page=wpforms-about2,1753.3749.1694.71
Form Templates /wp-admin/admin.php?page=wpforms-templates51,7773.06174.15708.40
Tools /wp-admin/admin.php?page=wpforms-tools1,4983.6462.5476.39
SMTP /wp-admin/admin.php?page=wpforms-smtp1,4383.6449.4789.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall successfully, leaving 7 tables in the database
    • wp_actionscheduler_logs
    • wp_actionscheduler_groups
    • wp_wpforms_payment_meta
    • wp_actionscheduler_actions
    • wp_wpforms_tasks_meta
    • wp_wpforms_payments
    • wp_actionscheduler_claims
  • This plugin did not uninstall successfully, leaving 19 options in the database
    • schema-ActionScheduler_StoreSchema
    • wpforms_challenge
    • schema-ActionScheduler_LoggerSchema
    • widget_theysaidso_widget
    • wpforms_versions_lite
    • db_upgraded
    • wpforms_version
    • theysaidso_admin_options
    • wpforms_activated
    • wpforms_version_lite
    • ...

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wpforms-lite/templates/emails/compact-field.php
    • > /wp-content/plugins/wpforms-lite/templates/emails/classic-field.php
  • 479× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms\\Vendor\\Stripe\\ApiResource' not found in wp-content/plugins/wpforms-lite/vendor_prefixed/stripe/stripe-php/lib/TaxRate.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms\\Vendor\\Stripe\\Exception\\OAuth\\OAuthErrorException' not found in wp-content/plugins/wpforms-lite/vendor_prefixed/stripe/stripe-php/lib/Exception/OAuth/UnsupportedResponseTypeException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms\\Vendor\\Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/wpforms-lite/vendor_prefixed/symfony/css-selector/XPath/Extension/PseudoClassExtension.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms\\Vendor\\Stripe\\ApiResource' not found in wp-content/plugins/wpforms-lite/vendor_prefixed/stripe/stripe-php/lib/Price.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms\\Vendor\\Stripe\\StripeObject' not found in wp-content/plugins/wpforms-lite/vendor_prefixed/stripe/stripe-php/lib/OAuthErrorObject.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms\\Vendor\\Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/wpforms-lite/vendor_prefixed/symfony/css-selector/XPath/Extension/HtmlExtension.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/wpforms-lite/src/Integrations/Elementor/Widget.php:14
    • > PHP Fatal error
      Trait 'WPForms\\Integrations\\Stripe\\Admin\\Builder\\Traits\\ContentTrait' not found in wp-content/plugins/wpforms-lite/src/Integrations/Stripe/Admin/Builder/Settings.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms\\Admin\\Tools\\Views\\View' not found in wp-content/plugins/wpforms-lite/src/Admin/Tools/Views/Importer.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms\\Vendor\\Stripe\\ApiResource' not found in wp-content/plugins/wpforms-lite/vendor_prefixed/stripe/stripe-php/lib/InvoiceItem.php:43

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

Optimizations

Plugin configuration 90% 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 (40 tag instead of maximum 10)
You can take inspiration from this readme.txt

wpforms-lite/wpforms.php 85% from 13 tests

The main PHP script in "Contact Form by WPForms - Drag & Drop Form Builder for WordPress" version 1.8.5.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("assets/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wpforms-lite.php" instead of "wpforms.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wpforms-lite/vendor_prefixed/stripe/stripe-php/data/ca-certificates.crt
183,629 lines of code in 1,273 files:
LanguageFilesBlank linesComment linesLines of code
PHP91020,28356,901101,875
CSS11210,0751,52354,577
JavaScript1427,23511,93024,211
SVG109002,966

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.36
Average class complexity11.57
▷ Minimum class complexity1.00
▷ Maximum class complexity335.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces138
Interfaces25
Traits14
Classes715
▷ Abstract classes517.13%
▷ Concrete classes66492.87%
▷ Final classes71.05%
Methods4,644
▷ Static methods47110.14%
▷ Public methods3,33971.90%
▷ Protected methods4319.28%
▷ Private methods87418.82%
Functions371
▷ Named functions27373.58%
▷ Anonymous functions9826.42%
Constants1,374
▷ Global constants151.09%
▷ Class constants1,35998.91%
▷ Public constants1,359100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
140 compressed PNG files occupy 2.67MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sullie-alt.png18.75KB19.35KB0.00%
assets/images/addon-icon-signatures.png7.45KB7.76KB0.00%
assets/images/addon-icon-activecampaign.png2.72KB2.59KB▼ 4.67%
assets/images/lite-settings-access/thumbnail-user-role-editor.png10.30KB6.98KB▼ 32.21%
assets/images/builder-default-arrow.png2.32KB2.49KB0.00%