56% wpeform-lite

Code Review | WPEForm Lite - Drag and Drop Live Form Builder for Contact, Payment & Quiz Forms

WordPress plugin WPEForm Lite - Drag and Drop Live Form Builder for Contact, Payment & Quiz Forms scored56%from 54 tests.

About plugin

  • Plugin page: wpeform-lite
  • Plugin version: 1.6.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Jul 23, 2021
  • Latest release: Jul 6, 2023
  • Number of updates: 37
  • Update frequency: every 19.3 days
  • Top authors: swashata (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,613 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲6.07MB] [CPU: ▲38.41ms] 75% from 4 tests

Analyzing server-side resources used by WPEForm Lite - Drag and Drop Live Form Builder for Contact, Payment & Quiz Forms
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 6.07MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.44 ▲5.9878.46 ▲41.80
Dashboard /wp-admin9.55 ▲6.2590.11 ▲40.77
Posts /wp-admin/edit.php9.45 ▲6.0989.57 ▲39.75
Add New Post /wp-admin/post-new.php12.01 ▲6.12128.51 ▲31.32
Media Library /wp-admin/upload.php9.32 ▲6.0984.72 ▲49.80
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.5675.48

Server storage [IO: ▲20.14MB] [DB: ▲0.04MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 1,328 new files
Database: 5 new tables, 12 new options
New tables
wp_wpq_eform_formmeta
wp_wpq_eform_submission
wp_wpq_eform_payment
wp_wpq_eform_category
wp_wpq_eform_form
New WordPress options
widget_theysaidso_widget
widget_recent-comments
fs_debug_mode
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
fs_accounts
wpeform-version
wp-eform-rewrite-flushed
...

Browser metrics Passed 4 tests

A check of browser resources used by WPEForm Lite - Drag and Drop Live Form Builder for Contact, Payment & Quiz Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,999 ▲26415.41 ▲0.825.76 ▲4.0525.15 ▼20.25
Dashboard /wp-admin2,397 ▲2056.07 ▲1.12159.37 ▲51.1758.35 ▲14.30
Posts /wp-admin/edit.php2,134 ▲452.00 ▼0.0136.11 ▼3.0833.58 ▼0.80
Add New Post /wp-admin/post-new.php1,535 ▲224.58 ▲1.26732.61 ▲41.1539.73 ▼22.57
Media Library /wp-admin/upload.php1,436 ▲484.24 ▲0.0695.82 ▼14.4542.56 ▼4.32
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1081.8428.7032.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wpeform-lite/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure failed, leaving 5 tables in the database
    • wp_wpq_eform_formmeta
    • wp_wpq_eform_submission
    • wp_wpq_eform_form
    • wp_wpq_eform_payment
    • wp_wpq_eform_category
  • Zombie WordPress options detected upon uninstall: 12 options
    • wpeform-version
    • wp-eform-rewrite-flushed
    • widget_recent-posts
    • widget_theysaidso_widget
    • wpeform-settings
    • fs_debug_mode
    • theysaidso_admin_options
    • db_upgraded
    • fs_active_plugins
    • fs_accounts
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wpeform-lite/inc/GraphQL/templates/playground.php
  • 147× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPEForm\\GeneralDeps\\GraphQL\\Language\\AST\ode' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/webonyx/graphql-php/src/Language/AST/EnumTypeDefinitionNode.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPEForm\\GeneralDeps\\GraphQL\\Validator\\Rules\\ValidationRule' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/webonyx/graphql-php/src/Validator/Rules/PossibleFragmentSpreads.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WPEForm\\GeneralDeps\\Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/symfony/css-selector/XPath/Extension/HtmlExtension.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'WPEForm\\GeneralDeps\\Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/symfony/css-selector/Parser/Shortcut/ElementParser.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WPEForm\\GeneralDeps\\GraphQL\\Language\\AST\ode' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/webonyx/graphql-php/src/Language/AST/ArgumentNode.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'WPEForm\\GeneralDeps\\GraphQL\\Error\\ClientAware' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/webonyx/graphql-php/src/Error/Error.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'WPEForm\\GeneralDeps\\GraphQL\\Validator\\Rules\\ValidationRule' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/webonyx/graphql-php/src/Validator/Rules/UniqueArgumentNames.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WPEForm\\GeneralDeps\\Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/symfony/css-selector/XPath/Extension/NodeExtension.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WPEForm\\GeneralDeps\\GraphQL\\Language\\AST\ode' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/webonyx/graphql-php/src/Language/AST/InlineFragmentNode.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'WPEForm\\GeneralDeps\\GraphQL\\Experimental\\Executor\\Runtime' not found in wp-content/plugins/wpeform-lite/php-deps/general/libs/webonyx/graphql-php/src/Experimental/Executor/CoroutineExecutor.php:51

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 23 tag instead of maximum 10
You can look at the official readme.txt

wpeform-lite/wp-eform.php 77% from 13 tests

"WPEForm Lite - Drag and Drop Live Form Builder for Contact, Payment & Quiz Forms" version 1.6.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wpeform-lite.php" instead of "wp-eform.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Please keep the plugin description shorter than 140 characters (currently 209 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected140,814 lines of code in 1,008 files:
LanguageFilesBlank linesComment linesLines of code
PHP75617,22551,69584,066
JavaScript7025227728,378
JSON370020,218
PO File43,2055,9436,671
SVG115021,180
HTML200198
CSS20911061
Markdown418042

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity14.99
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces88
Interfaces42
Traits0
Classes619
▷ Abstract classes284.52%
▷ Concrete classes59195.48%
▷ Final classes61.02%
Methods4,135
▷ Static methods82820.02%
▷ Public methods3,02173.06%
▷ Protected methods4069.82%
▷ Private methods70817.12%
Functions624
▷ Named functions19030.45%
▷ Anonymous functions43469.55%
Constants395
▷ Global constants10326.08%
▷ Class constants29273.92%
▷ Public constants26089.04%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
56 PNG files occupy 0.66MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
static/images/wpeform-logo-color.png27.83KB8.61KB▼ 69.07%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
dist/admin/assets/interface-ss-0097f230.png20.04KB20.96KB0.00%
static/freemius-pricing/27b5a722a5553d9de0170325267fccec.png6.35KB3.38KB▼ 46.76%
dist/admin/assets/interface-ss-13e53cc9.png13.50KB14.60KB0.00%