84% confirm-js-for-contact-form-7

Code Review | Confirm JS for Contact Form 7

WordPress plugin Confirm JS for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: confirm-js-for-co...
  • Plugin version: 0.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0
  • WordPress version: 6.3.1
  • First release: Aug 10, 2021
  • Latest release: Oct 26, 2022
  • Number of updates: 7
  • Update frequency: every 63.1 days
  • Top authors: milkyfield (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /812 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Confirm JS for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.93 ▲1.44
Dashboard /wp-admin3.31 ▲0.0044.15 ▼2.20
Posts /wp-admin/edit.php3.36 ▲0.0044.17 ▼6.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.94 ▼6.53
Media Library /wp-admin/upload.php3.23 ▲0.0035.10 ▼0.18

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Confirm JS for Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.64 ▼0.796.88 ▲5.2242.82 ▼1.42
Dashboard /wp-admin2,206 ▲145.91 ▲0.96106.41 ▼2.9439.55 ▼3.73
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0139.79 ▼1.0535.57 ▲0.62
Add New Post /wp-admin/post-new.php1,533 ▲523.22 ▲4.82657.42 ▲27.2954.16 ▲4.16
Media Library /wp-admin/upload.php1,388 ▲64.21 ▲0.0493.61 ▼32.8943.53 ▼0.11

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/confirm-js-for-contact-form-7/cjsfcf7.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/confirm-js-for-contact-form-7/trunk/cjsfcf7.php:22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: contact, confirm, cf7, form

confirm-js-for-contact-form-7/cjsfcf7.php 85% from 13 tests

The main PHP file in "Confirm JS for Contact Form 7" ver. 0.9 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("confirm-js-for-contact-form-7.php" instead of "cjsfcf7.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 163 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin195 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1221133
PO File19932
PHP171430

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin