78% calculation-for-contact-form-7

Code Review | Calculation For Contact Form 7

WordPress plugin Calculation For Contact Form 7 scored 78% from 54 tests.

About plugin

  • Plugin page: calculation-for-c...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3.1
  • WordPress version: 6.3.1
  • First release: May 19, 2022
  • Latest release: Sep 26, 2023
  • Number of updates: 10
  • Update frequency: every 49.6 days
  • Top authors: silverplugins217 (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

700+ active / 2,730 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.70ms] Passed 4 tests

A check of server-side resources used by Calculation For Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.61 ▼2.80
Dashboard /wp-admin3.31 ▲0.0043.77 ▼2.89
Posts /wp-admin/edit.php3.36 ▲0.0046.36 ▲0.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.84 ▼21.28
Media Library /wp-admin/upload.php3.23 ▲0.0033.62 ▲0.16

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Calculation For Contact Form 7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.28 ▼1.371.65 ▼0.5043.75 ▲2.04
Dashboard /wp-admin2,203 ▲155.84 ▼0.0696.66 ▼7.8740.74 ▼3.77
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0239.19 ▼3.8835.28 ▼2.87
Add New Post /wp-admin/post-new.php1,533 ▼923.16 ▲4.85616.19 ▼25.8854.63 ▼8.45
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.06100.14 ▲1.1943.23 ▼6.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/calculation-for-contact-form-7/calculation-for-contact-form-7.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/calculation-for-contact-form-7/main/resources/calculationcf7-load-js-css.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/calculation-for-contact-form-7/main/resources/calculationcf7-language.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/calculation-for-contact-form-7/main/resources/calculationcf7-installation-require.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/calculation-for-contact-form-7/main/backend/calculationcf7-calculator.php:9

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)
There were no browser issues found

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
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
You can look at the official readme.txt

calculation-for-contact-form-7/calculation-for-contact-form-7.php Passed 13 tests

The main file in "Calculation For Contact Form 7" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
50 characters long description:
This plugin allows calculation for contact form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin382 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11313192
PHP55326190

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin