68% easy-pricing-forms

Code Review | Easy Calculation Forms

WordPress plugin Easy Calculation Forms scored68%from 54 tests.

About plugin

  • Plugin page: easy-pricing-forms
  • Plugin version: 1.2.13
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.5
  • WordPress version: 6.3.1
  • First release: Apr 25, 2020
  • Latest release: Oct 28, 2020
  • Number of updates: 78
  • Update frequency: every 2.4 days
  • Top authors: EDGARROJAS (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,353 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.46MB] [CPU: ▲0.53ms] Passed 4 tests

Analyzing server-side resources used by Easy Calculation Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4945.10 ▲0.94
Dashboard /wp-admin3.80 ▲0.4949.91 ▼1.78
Posts /wp-admin/edit.php3.85 ▲0.4957.81 ▲8.59
Add New Post /wp-admin/post-new.php6.33 ▲0.4596.26 ▼0.89
Media Library /wp-admin/upload.php3.66 ▲0.4342.43 ▲3.86
Calculation Forms /wp-admin/admin.php?page=rednao_calculation_form3.7939.07
Entries /wp-admin/admin.php?page=rednao_calculation_form_entries3.8344.72
Help /wp-admin/admin.php?page=rednao_calculation_form_help3.6334.43
Settings /wp-admin/admin.php?page=rednao_calculation_form_settings3.6637.03

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 345 new files
Database: 6 new tables, 6 new options
New tables
wp_rednaoeasycalculationforms_records_detail
wp_rednaoeasycalculationforms_forms
wp_rednaoeasycalculationforms_links
wp_rednaoeasycalculationforms_records_meta
wp_rednaoeasycalculationforms_records
wp_rednaoeasycalculationforms_records_files
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Easy Calculation Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲6313.66 ▼0.891.57 ▼0.5542.23 ▲1.44
Dashboard /wp-admin2,228 ▲375.86 ▼0.0497.43 ▼5.9781.87 ▲35.02
Posts /wp-admin/edit.php2,123 ▲312.00 ▲0.0141.14 ▲0.5536.70 ▼2.45
Add New Post /wp-admin/post-new.php6,232 ▲4,71319.11 ▼4.02984.51 ▲301.49189.12 ▲137.24
Media Library /wp-admin/upload.php1,416 ▲254.26 ▲0.02102.28 ▼3.3682.16 ▲35.38
Calculation Forms /wp-admin/admin.php?page=rednao_calculation_form1,0944.5787.0985.81
Entries /wp-admin/admin.php?page=rednao_calculation_form_entries1,2596.67142.96109.81
Help /wp-admin/admin.php?page=rednao_calculation_form_help8102.0123.6726.28
Settings /wp-admin/admin.php?page=rednao_calculation_form_settings1,0193.8579.1532.31

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: 6 tables
    • wp_rednaoeasycalculationforms_records
    • wp_rednaoeasycalculationforms_records_meta
    • wp_rednaoeasycalculationforms_records_files
    • wp_rednaoeasycalculationforms_forms
    • wp_rednaoeasycalculationforms_records_detail
    • wp_rednaoeasycalculationforms_links
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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)
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=rednao_calculation_form
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 136× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\core\\db\\core\\RepositoryBase' not found in wp-content/plugins/easy-pricing-forms/core/db/FormRepository.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\Managers\\QueryManager\\Formatter\\CSVFormatter\\Columns\\CSVColumn' not found in wp-content/plugins/easy-pricing-forms/Managers/QueryManager/Formatter/CSVFormatter/Columns/LinkCSVColumn.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\core\\Managers\\ConditionManager\\Comparator\\ComparatorBase' not found in wp-content/plugins/easy-pricing-forms/core/Managers/ConditionManager/Comparator/MultipleValueComparator.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\Managers\\QueryManager\\Formatter\\QueryFormatterBase' not found in wp-content/plugins/easy-pricing-forms/Managers/QueryManager/Formatter/CSVFormatter/CSVQueryFormatter.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/easy-pricing-forms/jstranslations/FBGoogleMaps.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\core\\Managers\\FormManager\\Calculator\\CalculatorBase' not found in wp-content/plugins/easy-pricing-forms/core/Managers/FormManager/Calculator/NoneCalculator.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\core\\Managers\\FormManager\\Fields\\FBFieldBase' not found in wp-content/plugins/easy-pricing-forms/Managers/FormManager/Fields/FBGroupPanel.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\core\\Managers\\FormManager\\Calculator\\CalculatorBase' not found in wp-content/plugins/easy-pricing-forms/core/Managers/FormManager/Calculator/PricePerItemCalculator.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\core\\Managers\\FormManager\\Calculator\\CalculatorBase' not found in wp-content/plugins/easy-pricing-forms/core/Managers/FormManager/Calculator/SurveyOptionsCalculator.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'rednaoeasycalculationforms\\Managers\\QueryManager\\Formatter\\CSVFormatter\\Columns\\CSVColumn' not found in wp-content/plugins/easy-pricing-forms/Managers/QueryManager/Formatter/CSVFormatter/Columns/BasicStringCSVColumn.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: calculated fields, calculation forms, form, form builder, forms

easy-pricing-forms/rednaoeasycalculationforms.php 85% from 13 tests

The principal PHP file in "Easy Calculation Forms" v. 1.2.13 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-pricing-forms.php" instead of "rednaoeasycalculationforms.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin17,865 lines of code in 305 files:
LanguageFilesBlank linesComment linesLines of code
PHP2093,71161511,399
CSS258311704,182
JavaScript542967891,831
PO File1157176339
SVG80772
JSON70036
TypeScript1106

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.48
▷ Minimum class complexity1.00
▷ Maximum class complexity61.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces51
Interfaces2
Traits0
Classes229
▷ Abstract classes177.42%
▷ Concrete classes21292.58%
▷ Final classes00.00%
Methods752
▷ Static methods263.46%
▷ Public methods66988.96%
▷ Protected methods385.05%
▷ Private methods455.98%
Functions55
▷ Named functions11.82%
▷ Anonymous functions5498.18%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
25 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/fieldimages/textarea.png0.15KB0.11KB▼ 25.49%
images/fieldimages/radio.png0.79KB0.88KB0.00%
images/fieldimages/certificate.png3.80KB0.98KB▼ 74.07%
images/fieldimages/hidden.png0.74KB1.10KB0.00%
images/fieldimages/numeric.png3.00KB0.30KB▼ 90.06%