78% cf7-cost-calculator-price-calculation

Code Review | Contact Form 7 Cost Calculator - Price Calculator Free

WordPress plugin Contact Form 7 Cost Calculator - Price Calculator Free scored78%from 54 tests.

About plugin

  • Plugin page: cf7-cost-calculat...
  • Plugin version: 7.4.3
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2017
  • Latest release: Nov 28, 2023
  • Number of updates: 26
  • Update frequency: every 90.9 days
  • Top authors: rednumber (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

4,000+ active /40,423 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Contact Form 7 Cost Calculator - Price Calculator Free
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 851.87ms on /wp-admin/admin.php?page=fluent_forms-addons)
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.36 ▼7.92
Dashboard /wp-admin3.33 ▼0.0245.69 ▼15.90
Posts /wp-admin/edit.php3.38 ▲0.0247.41 ▲0.57
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.84 ▼13.88
Media Library /wp-admin/upload.php3.25 ▲0.0234.19 ▲0.64
Add-ons 36 /wp-admin/admin.php?page=contact-form-7-addons3.25924.48
Forms Add-ons 15 /wp-admin/admin.php?page=elementor-forms-addons3.23833.23
Add-ons 36 /wp-admin/admin.php?page=quform.dashboard-addons3.33928.23
Add-ons 9 /wp-admin/admin.php?page=wpforms.dashboard-addons3.23815.60
Add-ons 36 /wp-admin/admin.php?page=formidable-addons3.33909.44
Add-ons 36 /wp-admin/admin.php?page=fluent_forms-addons3.23851.87

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Cost Calculator - Price Calculator Free
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2114.70 ▲0.461.68 ▼0.1337.93 ▼4.16
Dashboard /wp-admin2,198 ▲205.63 ▼0.0390.24 ▼20.8043.28 ▼2.22
Posts /wp-admin/edit.php2,103 ▲32.00 ▼0.0140.71 ▲3.8234.85 ▲2.94
Add New Post /wp-admin/post-new.php1,529 ▲323.14 ▼0.24587.31 ▼71.0866.34 ▲15.27
Media Library /wp-admin/upload.php1,403 ▼04.19 ▲0.0394.98 ▼0.0139.72 ▼4.02
Add-ons 36 /wp-admin/admin.php?page=contact-form-7-addons1,4532.0423.5747.72
Forms Add-ons 15 /wp-admin/admin.php?page=elementor-forms-addons1,0821.9923.4535.11
Add-ons 36 /wp-admin/admin.php?page=quform.dashboard-addons2,3742.0426.3367.10
Add-ons 9 /wp-admin/admin.php?page=wpforms.dashboard-addons9961.9923.2434.35
Add-ons 36 /wp-admin/admin.php?page=formidable-addons2,3741.9923.2279.86
Add-ons 36 /wp-admin/admin.php?page=fluent_forms-addons8301.9922.6128.00

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cf7-cost-calculator-price-calculation/superaddons/check_purchase_code.php
    • > /wp-content/plugins/cf7-cost-calculator-price-calculation/add-ons.php
    • > /wp-content/plugins/cf7-cost-calculator-price-calculation/index.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-cost-calculator-price-calculation/backend/select.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-cost-calculator-price-calculation/backend/checkbox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-cost-calculator-price-calculation/backend/index.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-cost-calculator-price-calculation/backend/number_format.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-cost-calculator-price-calculation/frontend/index.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% 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
4 plugin tags: contact form 7, cf7, cost calculator, calculator form

cf7-cost-calculator-price-calculation/index.php 92% from 13 tests

The main PHP script in "Contact Form 7 Cost Calculator - Price Calculator Free" version 7.4.3 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cf7-cost-calculator-price-calculation.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin7,300 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript86114755,639
PHP87281,617
CSS20044

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity22.60
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin