78% wpcf7-redirect

Code Review | Redirection for Contact Form 7

WordPress plugin Redirection for Contact Form 7 scored78%from 54 tests.

About plugin

  • Plugin page: wpcf7-redirect
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 12, 2017
  • Latest release: Aug 4, 2023
  • Number of updates: 203
  • Update frequency: every 10.8 days
  • Top authors: yuvalsabar (73.4%)querysolutions (27.09%)

Code review

54 tests

User reviews

194 reviews

Install metrics

300,000+ active /3,126,117 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.22MB] [CPU: ▲35.54ms] 50% from 4 tests

This is a short check of server-side resources used by Redirection for Contact Form 7
Please take the time to fix the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,802.38ms on /wp-admin/admin.php?page=wpc7_redirect)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.22MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.82 ▲5.3672.75 ▲23.65
Dashboard /wp-admin8.84 ▲5.5478.95 ▲32.87
Posts /wp-admin/edit.php8.84 ▲5.4990.76 ▲42.91
Add New Post /wp-admin/post-new.php10.39 ▲4.51135.58 ▲42.72
Media Library /wp-admin/upload.php8.84 ▲5.6285.76 ▲54.08
Leads /wp-admin/edit.php?post_type=wpcf7r_leads8.8568.12
Redirection settings /wp-admin/admin.php?page=wpc7_redirect8.841,802.38
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.8468.93

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 287 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-comments
wpcf7_redirect_notifications
theysaidso_admin_options
fs_active_plugins
widget_theysaidso_widget
can_compress_scripts
wpcf7_migration_completed
wpcf7_redirect_version
fs_accounts
db_upgraded
...

Browser metrics Passed 4 tests

Checking browser requirements for Redirection for Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲21213.87 ▼0.518.32 ▲6.2928.95 ▼14.13
Dashboard /wp-admin2,250 ▲595.83 ▲0.9398.60 ▼13.7541.71 ▼0.32
Posts /wp-admin/edit.php2,136 ▲472.15 ▲0.1541.37 ▲3.8538.58 ▲0.11
Add New Post /wp-admin/post-new.php1,555 ▲2322.07 ▼1.22583.21 ▼67.4351.18 ▼3.88
Media Library /wp-admin/upload.php1,435 ▲474.27 ▲0.0596.08 ▼6.1844.41 ▼1.38
Leads /wp-admin/edit.php?post_type=wpcf7r_leads1,1451.9835.3830.38
Redirection settings /wp-admin/admin.php?page=wpc7_redirect1,0032.4937.8056.72
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0652.2023.0727.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wpcf7-redirect/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • fs_accounts
    • wpcf7_redirect_version
    • db_upgraded
    • wpcf7_migration_completed
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_active_plugins
    • widget_recent-comments
    • fs_debug_mode
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can look at the official readme.txt

wpcf7-redirect/wpcf7-redirect.php 85% from 13 tests

This is the main PHP file of "Redirection for Contact Form 7" version 3.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 187 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("5.2.0" instead of "5.1")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin42,726 lines of code in 211 files:
LanguageFilesBlank linesComment linesLines of code
PHP1909,27619,34339,129
CSS1528832,140
JavaScript52593041,243
Markdown1680214

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity72.32
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes71
▷ Abstract classes22.82%
▷ Concrete classes6997.18%
▷ Final classes00.00%
Methods1,568
▷ Static methods26016.58%
▷ Public methods1,16374.17%
▷ Protected methods171.08%
▷ Private methods38824.74%
Functions146
▷ Named functions13995.21%
▷ Anonymous functions74.79%
Constants177
▷ Global constants13073.45%
▷ Class constants4726.55%
▷ 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
24 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
build/images/logo-querysol.png0.77KB0.79KB0.00%
build/images/banner.png9.31KB9.12KB▼ 2.02%
freemius/assets/img/wpcf7r-api.png0.71KB0.45KB▼ 36.55%
build/images/icon8.png0.53KB0.54KB0.00%