84% cf7-redirect

Code Review | Contact Form 7 Redirect

WordPress plugin Contact Form 7 Redirect scored84%from 54 tests.

About plugin

  • Plugin page: cf7-redirect
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2.1
  • WordPress version: 6.3.1
  • First release: May 4, 2015
  • Latest release: May 4, 2015
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: tahiryasin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,798 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

A check of server-side resources used by Contact Form 7 Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.24 ▼0.22
Dashboard /wp-admin3.32 ▲0.0147.47 ▼9.64
Posts /wp-admin/edit.php3.37 ▲0.0143.88 ▼6.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.81 ▼0.04
Media Library /wp-admin/upload.php3.24 ▲0.0135.01 ▼3.83

Server storage [IO: ▲0.04MB] [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: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.111.69 ▼0.0846.12 ▲0.36
Dashboard /wp-admin2,195 ▲215.62 ▲0.0685.93 ▼17.7945.19 ▲0.02
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0235.41 ▼4.6133.14 ▼2.41
Add New Post /wp-admin/post-new.php1,526 ▼223.14 ▲0.13686.85 ▲24.8358.97 ▲9.90
Media Library /wp-admin/upload.php1,403 ▲34.22 ▼0.01100.83 ▼11.5146.79 ▲3.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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
Even though everything seems fine, this is not 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 fix the following items
  • 1× 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-redirect/contact-form-7-redirect.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Donate link: Invalid url: ""
You can look at the official readme.txt

cf7-redirect/contact-form-7-redirect.php 92% from 13 tests

Analyzing the main PHP file in "Contact Form 7 Redirect" version 1.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-redirect.php" instead of "contact-form-7-redirect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112629

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
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%
Functions4
▷ Named functions4100.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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png40.60KB11.38KB▼ 71.98%