68% weforms

Code Review | weForms - Easy Drag & Drop Contact Form Builder For WordPress

WordPress plugin weForms - Easy Drag & Drop Contact Form Builder For WordPress scored68%from 54 tests.

About plugin

  • Plugin page: weforms
  • Plugin version: 1.6.19
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 1, 2017
  • Latest release: Nov 8, 2023
  • Number of updates: 133
  • Update frequency: every 17.2 days
  • Top authors: webacetechs (24.81%)tareq1988 (22.56%)avonville1 (17.29%)rabbii (12.03%)NasirNobin (6.77%)

Code review

54 tests

User reviews

108 reviews

Install metrics

20,000+ active /656,721 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.50MB] [CPU: ▲5.96ms] Passed 4 tests

An overview of server-side resources used by weForms - Easy Drag & Drop Contact Form Builder For WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.55 ▲1.0844.09 ▲2.74
Dashboard /wp-admin4.95 ▲1.6452.80 ▼2.73
Posts /wp-admin/edit.php5.00 ▲1.6459.12 ▲11.65
Add New Post /wp-admin/post-new.php8.07 ▲2.1898.23 ▲12.16
Media Library /wp-admin/upload.php4.87 ▲1.6446.49 ▲12.23

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 367 new files
Database: 2 new tables, 10 new options
New tables
wp_weforms_entrymeta
wp_weforms_entries
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
weforms_version
weforms_settings
widget_theysaidso_widget
widget_weforms_widget
weforms_installed
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for weForms - Easy Drag & Drop Contact Form Builder For WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲8814.34 ▲0.061.72 ▼0.0341.45 ▼3.65
Dashboard /wp-admin2,255 ▲785.66 ▲0.0291.06 ▼8.9338.27 ▼5.72
Posts /wp-admin/edit.php2,160 ▲572.02 ▲0.0640.56 ▲0.9035.18 ▲1.93
Add New Post /wp-admin/post-new.php6,446 ▲4,92027.44 ▲4.07896.19 ▲239.7339.28 ▼20.42
Media Library /wp-admin/upload.php1,463 ▲634.22 ▲0.0495.03 ▼5.4942.44 ▲1.03
Premium /wp-admin/admin.php?page=weforms#/premium2,49212.03370.15152.09
Privacy /wp-admin/admin.php?page=weforms#/privacy1,2075.2277.4328.87
Entries /wp-admin/admin.php?page=weforms#/entries1,2035.2562.0826.82
Help /wp-admin/admin.php?page=weforms#/help1,3234.9656.4728.19
Settings /wp-admin/admin.php?page=weforms#/settings1,6185.1371.9632.34
All Forms /wp-admin/admin.php?page=weforms#/2,3485.9394.2940.33
Tools /wp-admin/admin.php?page=weforms#/tools1,4495.1470.5129.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 2 tables
    • wp_weforms_entrymeta
    • wp_weforms_entries
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • weforms_settings
    • weforms_installed
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_weforms_widget
    • can_compress_scripts
    • widget_recent-posts
    • weforms_version

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)
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/weforms/includes/admin/views/notification-integration.php
    • > /wp-content/plugins/weforms/includes/admin/views/vue-index.php
  • 87× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WeForms_Form_Template' not found in wp-content/plugins/weforms/includes/templates/class-template-tell-a-friend.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WeForms_Field_Contract' not found in wp-content/plugins/weforms/includes/fields/class-field-checkbox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/weforms/includes/functions.php:1300
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/weforms/includes/admin/views/weforms-settings-secure-database.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WeForms_Field_Contract' not found in wp-content/plugins/weforms/includes/fields/class-field-name.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WeForms_Field_Contract' not found in wp-content/plugins/weforms/includes/fields/class-field-hidden.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Weforms_REST_Controller' not found in wp-content/plugins/weforms/includes/api/class-weforms-entries-controller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WeForms_Form_Template' not found in wp-content/plugins/weforms/includes/templates/class-template-real-estate-listing.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Weforms_REST_Controller' not found in wp-content/plugins/weforms/includes/api/class-weforms-settings-controller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Weforms_REST_Controller' not found in wp-content/plugins/weforms/includes/api/class-weforms-uploads-controller.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

weforms/weforms.php Passed 13 tests

The primary PHP file in "weForms - Easy Drag & Drop Contact Form Builder For WordPress" version 1.6.19 is used by WordPress to initiate all plugin functionality
42 characters long description:
The best contact form plugin for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected71,621 lines of code in 279 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript617,0306,45139,665
PHP1294,2645,78221,626
CSS151,2031139,469
Sass21409660
XML700118
SVG640067
JSON10016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.97
▷ Minimum class complexity1.00
▷ Maximum class complexity223.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes134
▷ Abstract classes64.48%
▷ Concrete classes12895.52%
▷ Final classes10.78%
Methods743
▷ Static methods253.36%
▷ Public methods67190.31%
▷ Protected methods192.56%
▷ Private methods537.13%
Functions77
▷ Named functions6179.22%
▷ Anonymous functions1620.78%
Constants21
▷ Global constants1047.62%
▷ Class constants1152.38%
▷ Public constants11100.00%

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
73 PNG files occupy 0.69MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-paypal.png13.88KB7.85KB▼ 43.45%
assets/wpuf/css/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/form-template/loan-application.png8.36KB4.57KB▼ 45.30%
assets/images/icon-weforms.png1.03KB0.81KB▼ 21.78%
assets/images/form-template/contact.png3.38KB3.20KB▼ 5.38%