74% contact-form-7-multi-step-module

Code Review | Contact Form 7 Multi-Step Forms

WordPress plugin Contact Form 7 Multi-Step Forms scored74%from 54 tests.

About plugin

  • Plugin page: contact-form-7-mu...
  • Plugin version: 4.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Apr 15, 2013
  • Latest release: Jul 10, 2023
  • Number of updates: 168
  • Update frequency: every 23.7 days
  • Top authors: webheadllc (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

30,000+ active /554,702 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.55MB] [CPU: ▼0.33ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 Multi-Step Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.06 ▲0.6140.14 ▼3.19
Dashboard /wp-admin3.91 ▲0.6150.71 ▲4.59
Posts /wp-admin/edit.php3.96 ▲0.6148.60 ▼0.27
Add New Post /wp-admin/post-new.php6.43 ▲0.5491.83 ▼1.58
Media Library /wp-admin/upload.php3.67 ▲0.4437.77 ▲3.72
Contact Form 7 Multi-Step Forms /wp-admin/admin.php?page=contact-form-7-multi-step-module3.9141.48
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0434.24

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 204 new files
Database: no new tables, 11 new options
New WordPress options
_cf7msm_stats
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
_cf7msm_version
fs_active_plugins
fs_debug_mode
theysaidso_admin_options
fs_accounts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 Multi-Step Forms
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲10814.48 ▲0.121.85 ▼0.1030.78 ▼16.81
Dashboard /wp-admin2,227 ▲365.85 ▲0.96106.40 ▲4.1345.01 ▲1.51
Posts /wp-admin/edit.php2,107 ▲152.01 ▼0.0140.73 ▲2.4837.30 ▲2.55
Add New Post /wp-admin/post-new.php1,528 ▲818.04 ▼5.11597.45 ▼69.1553.22 ▲1.04
Media Library /wp-admin/upload.php1,406 ▲154.17 ▼0.0897.45 ▲1.1844.29 ▼0.69
Contact Form 7 Multi-Step Forms /wp-admin/admin.php?page=contact-form-7-multi-step-module9751.7125.7858.04
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0652.2023.8026.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/contact-form-7-multi-step-module/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • db_upgraded
    • fs_debug_mode
    • widget_recent-posts
    • widget_theysaidso_widget
    • fs_accounts
    • fs_active_plugins
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-multi-step-module/form-tags/module-session.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-multi-step-module/cf7msm-admin.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-multi-step-module/form-tags/module-back.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-multi-step-module/form-tags/module-multistep.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/contact-form-7-multi-step-module/form-tags/common.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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: step, contact form 7, multi, multistep form, form...

contact-form-7-multi-step-module/contact-form-7-multi-step-module.php Passed 13 tests

The primary PHP file in "Contact Form 7 Multi-Step Forms" version 4.3.1 is used by WordPress to initiate all plugin functionality
73 characters long description:
Enables the Contact Form 7 plugin to create multi-page, multi-step forms.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected35,699 lines of code in 156 files:
LanguageFilesBlank linesComment linesLines of code
PHP1268,26917,57534,963
JavaScript1095140590
Sass370127
CSS172119

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity93.06
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
Methods1,259
▷ Static methods19715.65%
▷ Public methods87069.10%
▷ Protected methods171.35%
▷ Private methods37229.55%
Functions158
▷ Named functions158100.00%
▷ Anonymous functions00.00%
Constants152
▷ Global constants10569.08%
▷ Class constants4730.92%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.28MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/plugin-icon.png128.04KB51.66KB▼ 59.66%
freemius/assets/img/contact-form-7-multi-step-module.png128.04KB51.66KB▼ 59.66%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
resources/logo.png3.24KB2.35KB▼ 27.46%