72% metform

Code Review | Metform Elementor Contact Form Builder

WordPress plugin Metform Elementor Contact Form Builder scored72%from 54 tests.

About plugin

  • Plugin page: metform
  • Plugin version: 3.8.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Nov 7, 2023
  • Number of updates: 152
  • Update frequency: every 10.1 days
  • Top authors: ataurr (88.16%)xpeedstudio (7.89%)wpmet (5.26%)

Code review

54 tests

User reviews

352 reviews

Install metrics

200,000+ active /2,542,089 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Metform Elementor Contact Form Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6445.66 ▲3.57
Dashboard /wp-admin4.01 ▲0.7060.95 ▲6.56
Posts /wp-admin/edit.php4.03 ▲0.6751.37 ▲2.66
Add New Post /wp-admin/post-new.php6.56 ▲0.67101.62 ▲13.20
Media Library /wp-admin/upload.php3.90 ▲0.6740.28 ▲5.77
Get Help /wp-admin/admin.php?page=metform_get_help2.6213.74

Server storage [IO: ▲10.63MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 321 new files
Database: no new tables, 11 new options
New WordPress options
metform__stories_data
widget_theysaidso_widget
metform_install_date
metform__banner_last_check
theysaidso_admin_options
widget_recent-posts
metform__stories_last_check
db_upgraded
metform__banner_data
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for Metform Elementor Contact Form Builder
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲20514.40 ▲0.051.73 ▼0.2132.63 ▼10.73
Dashboard /wp-admin2,397 ▲2205.70 ▲0.1286.78 ▼18.5470.92 ▲26.54
Posts /wp-admin/edit.php2,140 ▲402.00 ▼0.0240.51 ▲4.7234.80 ▼2.37
Add New Post /wp-admin/post-new.php1,557 ▲3120.66 ▼2.32584.34 ▼81.1550.65 ▼10.61
Media Library /wp-admin/upload.php1,436 ▲334.21 ▲0.05102.76 ▲5.2743.47 ▲0.79
Get Help /wp-admin/admin.php?page=metform_get_help280.410.073.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 11 options in the database
    • metform__stories_data
    • metform_install_date
    • widget_recent-comments
    • metform__stories_last_check
    • widget_theysaidso_widget
    • metform__banner_last_check
    • can_compress_scripts
    • db_upgraded
    • metform__banner_data
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/metform/widgets/simple-captcha/generate-captcha.php
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MetForm\\Core\\Integrations\\Onboard\\Attr' not found in wp-content/plugins/metform/core/integrations/onboard/views/settings-sections/modules.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/metform/core/integrations/onboard/views/settings-sections/usersettings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/metform/core/integrations/onboard/views/onboard-steps/step-04.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/metform/core/integrations/onboard/controls/settings/date.php:1
    • > PHP Fatal error
      Uncaught Error: Interface 'MetForm\\Core\\Integrations\\Mail_Adapter_Contract' not found in wp-content/plugins/metform/core/integrations/Mail_Adapter.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/metform/core/integrations/onboard/views/onboard-steps/step-05.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/metform/core/integrations/onboard/views/onboard-steps/step-06.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/metform/core/integrations/onboard/views/layout-onboard.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/metform/core/integrations/onboard/controls/settings/hidden.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/metform/core/integrations/onboard/views/settings-sections/dashboard.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=metform_get_help
    • > Network (severe)
    wp-admin/admin.php?page=metform-menu-settings&met-onboard-steps=loaded&met-onboard-steps-nonce=c0c8aa30ca - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: contact form builder, elementor forms builder, registration form builder, drag and drop builder, contact form...

metform/metform.php Passed 13 tests

"Metform Elementor Contact Form Builder" version 3.8.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
60 characters long description:
Most flexible and design friendly form builder for Elementor

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin42,197 lines of code in 261 files:
LanguageFilesBlank linesComment linesLines of code
PHP1124,24087720,638
SVG5103612,994
JSON10008,436
JavaScript72210084
XML1164230
CSS150815

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 190)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity21.76
▷ Minimum class complexity1.00
▷ Maximum class complexity323.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity190.00
Code structure
Namespaces17
Interfaces1
Traits6
Classes78
▷ Abstract classes45.13%
▷ Concrete classes7494.87%
▷ Final classes11.35%
Methods685
▷ Static methods8612.55%
▷ Public methods57784.23%
▷ Protected methods7711.24%
▷ Private methods314.53%
Functions21
▷ Named functions14.76%
▷ Anonymous functions2095.24%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
44 PNG files occupy 0.78MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
utils/pro-awareness/assets/images/request.png2.55KB2.62KB0.00%
core/integrations/onboard/assets/images/shape-04.png1.24KB0.55KB▼ 55.68%
core/integrations/onboard/assets/images/pro-line-shape.png1.43KB0.63KB▼ 55.78%
core/integrations/onboard/assets/images/shape-14.png0.55KB0.34KB▼ 37.72%
public/assets/img/flags.png69.20KB23.42KB▼ 66.16%