67% easy-form-builder

Code Review | Easy Form Builder

WordPress plugin Easy Form Builder scored67%from 54 tests.

About plugin

  • Plugin page: easy-form-builder
  • Plugin version: 3.6.16
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 236
  • Update frequency: every 4.2 days
  • Top authors: hassantafreshi (80.93%)mrlast (19.49%)

Code review

54 tests

User reviews

8 reviews

Install metrics

1,000+ active /28,651 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
Install script ran successfully

Server metrics [RAM: ▲1.73MB] [CPU: ▲13.15ms] Passed 4 tests

A check of server-side resources used by Easy Form Builder
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.88 ▲1.4252.58 ▲8.93
Dashboard /wp-admin5.19 ▲1.89100.24 ▲49.15
Posts /wp-admin/edit.php5.22 ▲1.8758.13 ▲8.86
Add New Post /wp-admin/post-new.php7.71 ▲1.82107.14 ▲14.35
Media Library /wp-admin/upload.php5.03 ▲1.8057.67 ▲20.47
Add-ons /wp-admin/admin.php?page=Emsfb_addon5.1254.07
Panel /wp-admin/admin.php?page=Emsfb5.2764.72
Create /wp-admin/admin.php?page=Emsfb_create5.1346.05

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 87 new files
Database: 5 new tables, 9 new options
New tables
wp_emsfb_form
wp_emsfb_stts_
wp_emsfb_rsp_
wp_emsfb_msg_
wp_emsfb_setting
New WordPress options
Emsfb_create
Emsfb_db_version
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
Emsfb_addon
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Easy Form Builder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲13813.47 ▼0.448.09 ▲6.0441.66 ▼4.12
Dashboard /wp-admin2,229 ▲525.55 ▼0.0586.36 ▼2.8980.96 ▲35.20
Posts /wp-admin/edit.php2,131 ▲311.99 ▲0.0537.17 ▼5.3934.72 ▼3.74
Add New Post /wp-admin/post-new.php1,715 ▲18924.65 ▲1.66744.51 ▲62.7061.20 ▼0.17
Media Library /wp-admin/upload.php1,431 ▲284.19 ▲0.0199.18 ▲3.2361.02 ▲18.10
Add-ons /wp-admin/admin.php?page=Emsfb_addon1,1762.9446.9997.18
Panel /wp-admin/admin.php?page=Emsfb1,2263.2349.6281.39
Create /wp-admin/admin.php?page=Emsfb_create1,6253.0144.7150.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 5 tables
    • wp_emsfb_stts_
    • wp_emsfb_form
    • wp_emsfb_setting
    • wp_emsfb_rsp_
    • wp_emsfb_msg_
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • can_compress_scripts
    • Emsfb_db_version
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • Emsfb_create
    • Emsfb_addon

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/easy-form-builder/emsfb.php
    • > /wp-content/plugins/easy-form-builder/includes/class-Emsfb.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-form-builder/includes/admin/class-Emsfb-admin.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Emsfb\\add_action() in wp-content/plugins/easy-form-builder/includes/class-Emsfb-webhook.php:28
    • > PHP Warning
      include(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/easy-form-builder/includes/admin/class-Emsfb-admin.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Emsfb\\is_admin() in wp-content/plugins/easy-form-builder/includes/admin/class-Emsfb-admin.php:43
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-includes/pluggable.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-form-builder/includes/admin/class-Emsfb-admin.php on line 37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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 to be fixed:
  • Requires php: Version format is invalid
You can look at the official readme.txt

easy-form-builder/emsfb.php 85% from 13 tests

The principal PHP file in "Easy Form Builder" v. 3.6.16 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 445 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-form-builder.php" instead of "emsfb.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected32,406 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript302,3741,96314,912
CSS1178533810,959
PHP239401,5136,444
JSON10069
SVG60222

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,008)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 871)
Cyclomatic complexity
Average complexity per logical line of code0.72
Average class complexity169.23
▷ Minimum class complexity1.00
▷ Maximum class complexity1,008.00
Average method complexity11.63
▷ Minimum method complexity1.00
▷ Maximum method complexity871.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods160
▷ Static methods2012.50%
▷ Public methods15697.50%
▷ Protected methods00.00%
▷ Private methods42.50%
Functions27
▷ Named functions13.70%
▷ Anonymous functions2696.30%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.43MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/assets/image/flags@2x.png170.28KB68.04KB▼ 60.04%
includes/admin/assets/image/logo-gray.png0.43KB0.75KB0.00%
public/assets/images/email_template1.png51.31KB13.46KB▼ 73.76%
includes/admin/assets/image/logo-20px.png0.43KB0.76KB0.00%
includes/admin/assets/image/header.png87.33KB38.19KB▼ 56.27%