83% wp-redirects-contact-form-7

Code Review | WP Redirects - Contact Form 7

WordPress plugin WP Redirects - Contact Form 7 scored83%from 54 tests.

About plugin

  • Plugin page: wp-redirects-cont...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2018
  • Latest release: Mar 30, 2023
  • Number of updates: 13
  • Update frequency: every 134.4 days
  • Top authors: yudiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /1,946 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.33ms] Passed 4 tests

An overview of server-side resources used by WP Redirects - Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.04 ▼5.05
Dashboard /wp-admin3.35 ▲0.0447.40 ▼4.46
Posts /wp-admin/edit.php3.40 ▲0.0453.86 ▲1.51
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.53 ▼14.11
Media Library /wp-admin/upload.php3.27 ▲0.0434.07 ▼1.71

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Redirects - Contact Form 7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.67 ▲0.152.43 ▲0.3742.43 ▼0.80
Dashboard /wp-admin2,200 ▲325.53 ▼0.0582.77 ▼19.0041.23 ▼1.74
Posts /wp-admin/edit.php2,108 ▲112.01 ▲0.0439.82 ▼0.6538.39 ▼0.15
Add New Post /wp-admin/post-new.php1,540 ▲1218.03 ▼5.07609.80 ▼18.1870.46 ▼2.51
Media Library /wp-admin/upload.php1,402 ▲24.20 ▲0.0099.65 ▼4.1246.31 ▲1.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wp-redirects-contact-form-7/wp-redirects-contact-form-7.php:20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-redirects-contact-form-7/includes/templates/redirection_table.php on line 5
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-redirects-contact-form-7/includes/templates/redirection_table.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-redirects-contact-form-7/includes/templates/redirection_table.php on line 5

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 83% from 29 tests

readme.txt 69% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • License uri: Invalid url: ""
  • License: Empty string
  • Donate link: Invalid url: ""
  • Stable tag: Empty string
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in wp-redirects-contact-form-7/assets to your readme.txt
You can take inspiration from this readme.txt

wp-redirects-contact-form-7/wp-redirects-contact-form-7.php Passed 13 tests

"WP Redirects - Contact Form 7" version 2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
71 characters long description:
This is custom redirection on successfull submission of contact form 7.

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 detected242 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24446193
JavaScript25649

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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 are no PNG files in this plugin