84% cost-calculator-for-wpforms

Code Review | Cost Calculator for WPForms

WordPress plugin Cost Calculator for WPForms scored84%from 54 tests.

About plugin

  • Plugin page: cost-calculator-f...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: wpformsaddons (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /66 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.99ms] 75% from 4 tests

An overview of server-side resources used by Cost Calculator for WPForms
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 841.25ms on /wp-admin/admin.php?page=fluent_forms-addons)
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.05 ▼4.98
Dashboard /wp-admin3.40 ▲0.0648.42 ▼14.18
Posts /wp-admin/edit.php3.52 ▲0.1645.86 ▼0.74
Add New Post /wp-admin/post-new.php6.01 ▲0.1288.58 ▼15.02
Media Library /wp-admin/upload.php3.33 ▲0.1033.89 ▼1.76
Add-ons 36 /wp-admin/admin.php?page=contact-form-7-addons3.32942.86
Add-ons 36 /wp-admin/admin.php?page=quform.dashboard-addons3.40905.71
Forms Add-ons 15 /wp-admin/admin.php?page=elementor-forms-addons3.31852.85
Add-ons 36 /wp-admin/admin.php?page=formidable-addons3.40877.25
Add-ons 9 /wp-admin/admin.php?page=wpforms.dashboard-addons3.31825.32
Add-ons 36 /wp-admin/admin.php?page=fluent_forms-addons3.31841.25

Server storage [IO: ▲0.43MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Cost Calculator for WPForms: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲5113.99 ▼0.151.96 ▼0.1238.30 ▼5.32
Dashboard /wp-admin2,221 ▲475.63 ▲0.1191.88 ▼8.6641.22 ▼1.29
Posts /wp-admin/edit.php2,105 ▲52.00 ▼0.0240.22 ▼0.1334.64 ▼1.40
Add New Post /wp-admin/post-new.php1,531 ▲523.19 ▲0.07626.53 ▲26.9051.67 ▲9.48
Media Library /wp-admin/upload.php1,405 ▲54.19 ▲0.0296.32 ▲1.2041.84 ▲0.78
Add-ons 36 /wp-admin/admin.php?page=contact-form-7-addons1,4522.0725.4247.85
Add-ons 36 /wp-admin/admin.php?page=quform.dashboard-addons2,3792.0025.2967.24
Forms Add-ons 15 /wp-admin/admin.php?page=elementor-forms-addons1,0872.0124.1435.24
Add-ons 36 /wp-admin/admin.php?page=formidable-addons2,3762.0125.0063.37
Add-ons 9 /wp-admin/admin.php?page=wpforms.dashboard-addons9922.0123.1834.73
Add-ons 36 /wp-admin/admin.php?page=fluent_forms-addons8352.0124.4427.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cost-calculator-for-wpforms/superaddons/check_purchase_code.php
    • > /wp-content/plugins/cost-calculator-for-wpforms/cost-calculator-for-wpforms.php
    • > /wp-content/plugins/cost-calculator-for-wpforms/add-ons.php

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #4 (Addmin field) image missing
The official readme.txt might help

cost-calculator-for-wpforms/cost-calculator-for-wpforms.php Passed 13 tests

The main file in "Cost Calculator for WPForms" v. 1.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
86 characters long description:
Create forms with field values calculated based in other form field values for WPForms

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 plugin6,940 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript86094805,682
PHP571381,222
CSS20036

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity28.00
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods49
▷ Static methods00.00%
▷ Public methods4897.96%
▷ Protected methods00.00%
▷ Private methods12.04%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin