84% cf7-multi-step-forms

Code Review | Contact Form 7 Multi-step Forms (Add-on for CF7)

WordPress plugin Contact Form 7 Multi-step Forms (Add-on for CF7) scored84%from 54 tests.

About plugin

  • Plugin page: cf7-multi-step-forms
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 5, 2018
  • Latest release: Mar 24, 2019
  • Number of updates: 13
  • Update frequency: every 27.2 days
  • Top authors: azmarket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.30ms] Passed 4 tests

Server-side resources used by Contact Form 7 Multi-step Forms (Add-on for CF7)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.64 ▲0.29
Dashboard /wp-admin3.31 ▲0.0144.47 ▼4.67
Posts /wp-admin/edit.php3.36 ▲0.0147.34 ▼5.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.99 ▼11.74
Media Library /wp-admin/upload.php3.24 ▲0.0137.93 ▲1.03

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Multi-step Forms (Add-on for CF7)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲7413.29 ▼1.084.63 ▲2.8550.11 ▲6.78
Dashboard /wp-admin2,212 ▲275.83 ▼0.0897.93 ▼10.2239.30 ▼4.60
Posts /wp-admin/edit.php2,101 ▲122.01 ▼0.0341.38 ▲0.4634.97 ▼1.63
Add New Post /wp-admin/post-new.php1,551 ▲2223.36 ▲5.28677.26 ▲52.0067.29 ▲11.48
Media Library /wp-admin/upload.php1,400 ▲154.18 ▼0.1198.18 ▲1.3944.18 ▼1.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-multi-step-forms/inc/frontend.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cf7-multi-step-forms/inc/tpl/admin-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cf7-multi-step-forms/cf7-multistep-forms.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-multi-step-forms/inc/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cf7-multi-step-forms/inc/tpl/admin-form.php:1

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: multi-step, cf7, contact form 7, azmarket, cf 7 multi-step...

cf7-multi-step-forms/cf7-multistep-forms.php 85% from 13 tests

"Contact Form 7 Multi-step Forms (Add-on for CF7)" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-multi-step-forms.php" instead of "cf7-multistep-forms.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,685 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3152116777
CSS2288523
PHP66525373
SVG10012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.67
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods215.38%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/admin/contact-form-7-multi-step-pro.png17.37KB5.84KB▼ 66.35%