84% cf7-multistep

Code Review | Contact Form 7 Multi-Step

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

About plugin

  • Plugin page: cf7-multistep
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: May 19, 2017
  • Latest release: Jul 21, 2023
  • Number of updates: 7
  • Update frequency: every 322.1 days
  • Top authors: rednumber (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /3,252 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Contact Form 7 Multi-Step
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0140.51 ▼3.23
Dashboard /wp-admin3.35 ▲0.0149.17 ▼3.95
Posts /wp-admin/edit.php3.40 ▲0.0150.41 ▼4.41
Add New Post /wp-admin/post-new.php5.93 ▲0.0185.42 ▼16.27
Media Library /wp-admin/upload.php3.28 ▲0.0033.69 ▼7.89

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 Multi-Step
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.26 ▼0.091.77 ▲0.0943.31 ▲1.93
Dashboard /wp-admin2,201 ▲215.52 ▼0.1482.99 ▼11.5136.29 ▼5.35
Posts /wp-admin/edit.php2,103 ▲32.03 ▲0.0334.30 ▼8.1136.96 ▲3.00
Add New Post /wp-admin/post-new.php1,543 ▲922.81 ▲4.90675.65 ▼33.5156.14 ▼29.54
Media Library /wp-admin/upload.php1,406 ▲154.19 ▼0.0396.67 ▼4.2446.52 ▲2.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cf7-multistep/backend/index.php
    • > /wp-content/plugins/cf7-multistep/index.php
    • > /wp-content/plugins/cf7-multistep/frontend/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7 in cf7-multistep/assets to your readme.txt
The official readme.txt is a good inspiration

cf7-multistep/index.php 92% from 13 tests

The main PHP file in "Contact Form 7 Multi-Step" ver. 1.6.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cf7-multistep.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
No dangerous file extensions were detected1,265 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript310720519
PHP32131437
CSS2315309

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.33
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin