72% easy-form

Code Review | Easy Form by AYS - Form Builder Plugin for WordPress

WordPress plugin Easy Form by AYS - Form Builder Plugin for WordPress scored72%from 54 tests.

About plugin

  • Plugin page: easy-form
  • Plugin version: 1.5.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2022
  • Latest release: Nov 28, 2023
  • Number of updates: 119
  • Update frequency: every 2.9 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /2,751 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲2.96MB] [CPU: ▲15.52ms] 75% from 4 tests

Server-side resources used by Easy Form by AYS - Form Builder Plugin for WordPress
The following require your attention
  • CPU: The total CPU usage must kept under 500.00ms (currently 3,453.96ms on /wp-admin/admin.php?page=ays-form-maker-our-products)
PageMemory (MB)CPU Time (ms)
Home /6.39 ▲2.9352.34 ▲14.33
Dashboard /wp-admin6.30 ▲2.9967.22 ▲20.18
Posts /wp-admin/edit.php6.33 ▲2.9772.33 ▲23.26
Add New Post /wp-admin/post-new.php8.94 ▲3.0598.75 ▲4.29
Media Library /wp-admin/upload.php6.17 ▲2.9463.27 ▲30.03
/wp-admin/admin.php?page=ays-form-maker-each-entry6.4762.19
Form Categories /wp-admin/admin.php?page=ays-form-maker-form-categories6.3155.51
Add new /wp-admin/admin.php?page=ays-form-maker-add-new6.2454.68
Submissions /wp-admin/admin.php?page=ays-form-maker-entries6.3366.82
PRO Features /wp-admin/admin.php?page=ays-form-maker-form-features6.3255.70
Export / Import /wp-admin/admin.php?page=ays-form-maker-export-import6.2459.00
General Settings /wp-admin/admin.php?page=ays-form-maker-settings6.5655.92
Forms /wp-admin/admin.php?page=ays-form-maker6.3359.36
Our products /wp-admin/admin.php?page=ays-form-maker-our-products6.783,453.96
How to use /wp-admin/admin.php?page=ays-form-maker-dashboard6.2453.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 267 new files
Database: 9 new tables, 10 new options
New tables
wp_aysform_settings
wp_aysform_answers
wp_aysform_fields
wp_aysform_field_categories
wp_aysform_entries
wp_aysform_entries_fields
wp_aysform_form_categories
wp_aysform_forms
wp_aysform_sections
New WordPress options
ays_form_sale_btn_for_two_months
ays_form_db_version
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
ays_form_sale_date
widget_theysaidso_widget
can_compress_scripts
ays_form_sale_btn

Browser metrics Passed 4 tests

Checking browser requirements for Easy Form by AYS - Form Builder Plugin for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲11514.57 ▲0.181.64 ▼0.0927.25 ▼18.05
Dashboard /wp-admin2,283 ▲1095.56 ▼0.1297.46 ▼3.1372.45 ▲11.26
Posts /wp-admin/edit.php2,191 ▲911.98 ▼0.0436.55 ▼1.2637.39 ▲0.33
Add New Post /wp-admin/post-new.php6,255 ▲4,72925.57 ▲2.321,040.09 ▲394.9340.58 ▼18.71
Media Library /wp-admin/upload.php1,485 ▲914.14 ▼0.06107.14 ▲7.5482.04 ▲39.53
/wp-admin/admin.php?page=ays-form-maker-each-entry2,0465.84140.35166.28
Form Categories /wp-admin/admin.php?page=ays-form-maker-form-categories1,9175.85133.68114.89
Add new /wp-admin/admin.php?page=ays-form-maker-add-new16,47417.60681.63212.02
Submissions /wp-admin/admin.php?page=ays-form-maker-entries2,0465.7288.32105.73
PRO Features /wp-admin/admin.php?page=ays-form-maker-form-features2,5485.6783.0683.97
Export / Import /wp-admin/admin.php?page=ays-form-maker-export-import1,7996.1892.5884.88
General Settings /wp-admin/admin.php?page=ays-form-maker-settings4,6446.73114.58147.96
Forms /wp-admin/admin.php?page=ays-form-maker2,64215.52333.51157.31
Our products /wp-admin/admin.php?page=ays-form-maker-our-products1,7565.7577.78108.62
How to use /wp-admin/admin.php?page=ays-form-maker-dashboard1,6905.6382.52117.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • ays_form_sale_btn_for_two_months
    • ays_form_sale_date
    • widget_theysaidso_widget
    • ays_form_sale_btn
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ays-form-maker-each-entry
    • > Notice in wp-content/plugins/easy-form/admin/partials/entries/ays-form-maker-each-entry-display.php+139
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ays-form-maker-each-entry
    • > Notice in wp-content/plugins/easy-form/admin/partials/entries/ays-form-maker-each-entry-display.php+314
    Trying to access array offset on value of type bool
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ays-form-maker-each-entry
    • > Notice in wp-content/plugins/easy-form/includes/lists/class-ays-form-maker-each-entry-list-table.php+56
    Undefined index: form

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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-form/public/partials/ays-form-maker-public-display.php
    • > /wp-content/plugins/easy-form/admin/partials/forms/actions/partials/general-tab-parts/types/for-js/type-text.php
    • > /wp-content/plugins/easy-form/admin/partials/forms/actions/partials/general-tab-parts/field-parts/field-other-answer.php
  • 126× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/easy-form/admin/partials/forms/actions/ays-form-maker-forms-actions-options.php:14
    • > PHP Notice
      Undefined variable: question_types_placeholders in wp-content/plugins/easy-form/admin/partials/forms/actions/partials/general-tab-parts/types/edit/type-text.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/easy-form/admin/partials/orders/ays-form-maker-orders-display.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Ays_Form_Maker_Data' not found in wp-content/plugins/easy-form/admin/partials/forms/actions/partials/ays-form-maker-forms-actions-tab1.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/easy-form/admin/partials/forms/actions/partials/general-tab-parts/field-for-js.php:18
    • > PHP Notice
      Undefined variable: selected_question_type in wp-content/plugins/easy-form/admin/partials/forms/actions/partials/general-tab-parts/types/edit/type-text.php on line 20
    • > PHP Notice
      Undefined variable: ays_tab in wp-content/plugins/easy-form/admin/partials/forms/actions/partials/ays-form-maker-forms-actions-tab3.php on line 1
    • > PHP Notice
      Undefined variable: field_action in wp-content/plugins/easy-form/admin/partials/forms/actions/partials/general-tab-parts/field-parts/field-more-options.php on line 3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-upgrader.php): failed to open stream: No such file or directory in wp-content/plugins/easy-form/includes/admin/class-ays-form-maker-upgrader.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/easy-form/admin/partials/forms/actions/partials/general-tab-parts/field-parts/field-more-options.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: wp form plugin, forms, payment form, questionnaire, contact form plugin...

easy-form/easy-form.php Passed 13 tests

This is the main PHP file of "Easy Form by AYS - Form Builder Plugin for WordPress" version 1.5.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
128 characters long description:
The best WordPress form builder plugin. Create contact forms, subscription forms, payment forms, or any custom forms in minutes.

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
There were no executable files found in this plugin45,460 lines of code in 191 files:
LanguageFilesBlank linesComment linesLines of code
PHP753,6553,16823,739
CSS301,44872610,824
JavaScript281,4431,20710,397
SVG5742288
JSON100212

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 673)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity164.47
▷ Minimum class complexity1.00
▷ Maximum class complexity891.00
Average method complexity8.92
▷ Minimum method complexity1.00
▷ Maximum method complexity673.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods392
▷ Static methods11629.59%
▷ Public methods37395.15%
▷ Protected methods123.06%
▷ Private methods71.79%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
58 PNG files occupy 0.49MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icons/ask-question.png2.89KB2.89KB0.03%
admin/images/icons/easyform_logo.png1.67KB1.51KB▼ 9.68%
admin/images/icons/quiz-128x128.png3.16KB3.00KB▼ 4.92%
admin/images/easyform_logo_128x128.png6.73KB3.56KB▼ 47.06%
admin/images/down_red_arrow.png0.95KB0.47KB▼ 50.26%