71% zigaform-calculator-cost-estimation-form-builder-lite

Code Review | Zigaform - Price Calculator & Cost Estimation Form Builder Lite

WordPress plugin Zigaform - Price Calculator & Cost Estimation Form Builder Lite scored 71% from 54 tests.

About plugin

  • Plugin page: zigaform-calculat...
  • Plugin version: 5.7.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Sep 24, 2023
  • Number of updates: 156
  • Update frequency: every 16.4 days
  • Top authors: softdiscover (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

400+ active / 41,366 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.07MB] [CPU: ▲10.53ms] Passed 4 tests

A check of server-side resources used by Zigaform - Price Calculator & Cost Estimation Form Builder Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.74 ▲1.2853.88 ▲6.27
Dashboard /wp-admin5.64 ▲2.3468.08 ▲19.08
Posts /wp-admin/edit.php5.75 ▲2.3972.07 ▲21.69
Add New Post /wp-admin/post-new.php8.23 ▲2.34104.43 ▼2.16
Media Library /wp-admin/upload.php5.55 ▲2.3256.72 ▲18.91
About /wp-admin/admin.php?page=zigaform-cost-about5.5947.87
Help /wp-admin/admin.php?page=zigaform-cost-help5.5853.47
Forms /wp-admin/admin.php?page=zgfm_form_builder6.4559.88
Go Pro! /wp-admin/admin.php?page=zigaform-cost-gopro5.5948.02

Server storage [IO: ▲39.15MB] [DB: ▲0.02MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Try to limit filesystem usage to 25MB (currently using 39.15MB)
Filesystem: 1,654 new files
Database: 14 new tables, 10 new options
New tables
wp_cest_uiform_pay_logs
wp_cest_uiform_visitor
wp_cest_uiform_pay_gateways
wp_cest_uiform_form
wp_cest_uiform_settings
wp_cest_uiform_form_records
wp_cest_uiform_fields
wp_cest_addon_details
wp_cest_uiform_form_log
wp_cest_uiform_visitor_error
...
New WordPress options
theysaidso_admin_options
zgfm_c_modalmode
uifmcostest_version
zgfm_c_activated
can_compress_scripts
widget_recent-comments
widget_recent-posts
zigaform_c_notice_1
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Zigaform - Price Calculator & Cost Estimation Form Builder Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲22114.38 ▼0.216.67 ▲4.5336.94 ▼0.73
Dashboard /wp-admin2,301 ▲1135.73 ▲0.66121.91 ▲7.2773.80 ▲30.00
Posts /wp-admin/edit.php2,218 ▲1292.79 ▲0.7446.30 ▲4.1269.66 ▲33.98
Add New Post /wp-admin/post-new.php1,769 ▲25523.69 ▲6.16759.77 ▲61.1339.79 ▼10.53
Media Library /wp-admin/upload.php1,499 ▲1085.06 ▲0.83131.70 ▲27.5547.97 ▼1.41
About /wp-admin/admin.php?page=zigaform-cost-about1,8425.60162.55141.47
Help /wp-admin/admin.php?page=zigaform-cost-help1,1404.4366.2541.87
Forms /wp-admin/admin.php?page=zgfm_form_builder1,7635.0365.9961.38
Go Pro! /wp-admin/admin.php?page=zigaform-cost-gopro1,4234.4658.1357.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • zigaform_c_notice_1
    • theysaidso_admin_options
    • zgfm_c_modalmode
    • zgfm_c_activated
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 316× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/gateways/views/settings/view_settings.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/formbuilder/views/fields/templates/prevpanel_colorpicker.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/formbuilder/views/fields/render_css_front/type_divider.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/libraries/lesslib/lessc.inc.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/formbuilder/views/fields/render_css_front/type_radiobutton.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/formbuilder/views/fields/templates/prevpanel_textbox.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/formbuilder/views/forms/preview_fields.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/formbuilder/views/fields/modal/settings_form_clogic.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/gateways/controllers/uiform-pg-controller-records.php
    • > /wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/formbuilder/views/fields/templates/prevpanel_quickopts3.php
  • 30× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Languages\\Exporter\\Exporter' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/addon_mgtranslate/vendor/gettext/languages/src/Exporter/Html.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Languages\\Exporter\\Exporter' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/addon_mgtranslate/vendor/gettext/languages/src/Exporter/Po.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Gettext\\Scanner\\ScannerInterface' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/addon_mgtranslate/vendor/gettext/gettext/src/Scanner/Scanner.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/libraries/recaptcha2/ReCaptcha/RequestMethod/Post.php:36
    • > PHP Fatal error
      Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16. in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/libraries/recaptcha/1.3.0/vendor/composer/platform_check.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'UiformCostEstLite' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/views/requirements-error.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/libraries/recaptcha/1.3.0/src/ReCaptcha/RequestMethod/SocketPost.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Generator\\Generator' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/addon_mgtranslate/vendor/gettext/gettext/src/Generator/MoGenerator.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Loader\\Loader' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/modules/addon_mgtranslate/vendor/gettext/gettext/src/Loader/MoLoader.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'SFM_Group' not found in wp-content/plugins/zigaform-calculator-cost-estimation-form-builder-lite/libraries/styles-font-menu/classes/sfm-group-standard.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=zigaform-cost-about
    • > Network (severe)
    https://count-server.sharethis.com/v2.0/get_counts?url=https%3A%2F%2Fwordpress-cost-estimator.zigaform.com%2F&cb=stButtons.processCB&wd=true - Failed to load resource: the server responded with a status of 400 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (18 tag instead of maximum 10)
Please take inspiration from this readme.txt

zigaform-calculator-cost-estimation-form-builder-lite/zigaform-cost-estimator-lite.php 92% from 13 tests

The primary PHP file in "Zigaform - Price Calculator & Cost Estimation Form Builder Lite" version 5.7.6 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zigaform-calculator-cost-estimation-form-builder-lite.php" instead of "zigaform-cost-estimator-lite.php")

Code Analysis 97% 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
Everything looks great! No dangerous files found in this plugin287,527 lines of code in 762 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript19014,27212,570117,813
CSS849,1761,20191,451
PHP3997,75611,10050,746
PO File157,5257,55516,666
SVG9003,828
JSON23002,377
Sass1434341,768
LESS1434441,758
HTML81200675
Markdown51920439
YAML1206

PHP code 50% from 2 tests

A brief analysis 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 167)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity31.50
▷ Minimum class complexity1.00
▷ Maximum class complexity513.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity167.00
Code structure
Namespaces13
Interfaces8
Traits1
Classes116
▷ Abstract classes76.03%
▷ Concrete classes10993.97%
▷ Final classes76.42%
Methods1,446
▷ Static methods1429.82%
▷ Public methods1,07674.41%
▷ Protected methods33122.89%
▷ Private methods392.70%
Functions24
▷ Named functions1250.00%
▷ Anonymous functions1250.00%
Constants182
▷ Global constants2413.19%
▷ Class constants15886.81%
▷ Public constants15598.10%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
747 PNG files occupy 1.68MB with 0.86MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libraries/styles-font-menu/styles-fonts/png/mrbedfort-regular.png2.99KB1.43KB▼ 51.98%
libraries/styles-font-menu/styles-fonts/png/novamono-regular.png1.38KB0.70KB▼ 49.44%
libraries/styles-font-menu/styles-fonts/png/ptsanscaption-regular.png2.37KB1.12KB▼ 52.91%
libraries/styles-font-menu/styles-fonts/png/felipa-regular.png1.82KB0.88KB▼ 51.56%
libraries/styles-font-menu/styles-fonts/png/cagliostro-regular.png1.95KB0.97KB▼ 50.28%