84% cf7-redirect-thank-you-page

Code Review | Contact Form 7 Redirect & Thank You Page

WordPress plugin Contact Form 7 Redirect & Thank You Page scored84%from 54 tests.

About plugin

  • Plugin page: cf7-redirect-than...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 24, 2019
  • Latest release: Mar 20, 2023
  • Number of updates: 15
  • Update frequency: every 99.0 days
  • Top authors: scottpaterson (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

6,000+ active /30,453 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Contact Form 7 Redirect & Thank You Page
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.39 ▼8.25
Dashboard /wp-admin3.31 ▲0.0148.54 ▼2.39
Posts /wp-admin/edit.php3.36 ▲0.0147.35 ▼6.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.34 ▼4.13
Media Library /wp-admin/upload.php3.23 ▲0.0039.70 ▲6.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
cf7rl_options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 Redirect & Thank You Page
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.75 ▲0.371.92 ▲0.1443.37 ▼3.36
Dashboard /wp-admin2,200 ▲235.56 ▼0.0888.63 ▼5.2937.94 ▼4.80
Posts /wp-admin/edit.php2,112 ▲151.98 ▼0.0334.52 ▼7.4843.67 ▲5.67
Add New Post /wp-admin/post-new.php1,539 ▲223.29 ▲5.28691.22 ▲67.5351.43 ▼22.99
Media Library /wp-admin/upload.php1,414 ▲174.27 ▲0.05100.31 ▼1.7746.64 ▼0.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • cf7rl_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cf7-redirect-thank-you-page/cf7-redirect.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
6 plugin tags: cf7, contact form 7, cf7 redirect, contact form 7 thank you page, contact form 7 redirect...

cf7-redirect-thank-you-page/cf7-redirect.php 92% from 13 tests

"Contact Form 7 Redirect & Thank You Page" version 1.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-redirect-thank-you-page.php" instead of "cf7-redirect.php")

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
Everything looks great! No dangerous files found in this plugin657 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP824258386
JavaScript27416137
CSS1241134

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin