89% simple-redirection-for-contact-form-7

Code Review | Simple Redirection for Contact Form 7

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

About plugin

  • Plugin page: simple-redirectio...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 6.3.1
  • First release: Feb 13, 2021
  • Latest release: Mar 4, 2021
  • Number of updates: 13
  • Update frequency: every 1.5 days
  • Top authors: mrdarpan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,863 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.73ms] Passed 4 tests

A check of server-side resources used by Simple Redirection for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.37 ▲0.17
Dashboard /wp-admin3.38 ▲0.0343.80 ▼19.82
Posts /wp-admin/edit.php3.49 ▲0.1347.53 ▲5.78
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.21 ▼3.76
Media Library /wp-admin/upload.php3.30 ▲0.0738.60 ▲4.49

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: 22 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Simple Redirection for Contact Form 7: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13813.93 ▼0.647.56 ▲5.9436.09 ▼5.34
Dashboard /wp-admin2,202 ▲215.63 ▼0.0890.55 ▼6.2139.13 ▼0.60
Posts /wp-admin/edit.php2,104 ▲42.05 ▲0.0639.21 ▲2.6738.63 ▲2.53
Add New Post /wp-admin/post-new.php1,533 ▲723.17 ▼0.40647.96 ▼33.7451.98 ▼1.76
Media Library /wp-admin/upload.php1,407 ▲74.20 ▲0.0395.54 ▼5.7341.37 ▼4.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: simple redirection, cf7 redirect, redirection, cf7 simple redirection, contact form 7 redirection...

simple-redirection-for-contact-form-7/dck-cf7-simple-redirection.php 85% from 13 tests

The principal PHP file in "Simple Redirection for Contact Form 7" v. 1.0.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-redirection-for-contact-form-7.php" instead of "dck-cf7-simple-redirection.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin378 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP106512303
JavaScript49047
CSS25028

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin