84% wp-post-redirect

Code Review | WP Post Redirect

WordPress plugin WP Post Redirect scored 84% from 54 tests.

About plugin

  • Plugin page: wp-post-redirect
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Jul 13, 2013
  • Latest release: May 18, 2023
  • Number of updates: 18
  • Update frequency: every 199.8 days
  • Top authors: Milmor (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active / 22,425 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼11.20ms] Passed 4 tests

Server-side resources used by WP Post Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.70 ▼6.64
Dashboard /wp-admin3.33 ▲0.0343.73 ▼6.51
Posts /wp-admin/edit.php3.38 ▲0.0346.07 ▼8.06
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.05 ▼23.59
Media Library /wp-admin/upload.php3.25 ▲0.0335.95 ▲2.12

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Post Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.59 ▼0.581.81 ▼0.0438.89 ▼13.95
Dashboard /wp-admin2,206 ▲184.82 ▼1.03114.63 ▲15.6743.23 ▼2.04
Posts /wp-admin/edit.php2,102 ▲132.02 ▼0.0153.25 ▲10.5147.38 ▲11.07
Add New Post /wp-admin/post-new.php6,460 ▲4,92720.19 ▼2.99824.41 ▲145.4958.35 ▼11.95
Media Library /wp-admin/upload.php1,388 ▼04.21 ▲0.0194.37 ▼1.0240.61 ▼0.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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 no errors were found, this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-post-redirect/postredirect.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-post-redirect/admin-column.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-post-redirect/postredirect.php 92% from 13 tests

"WP Post Redirect" version 1.4.1'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 ("wp-post-redirect.php" instead of "postredirect.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
No dangerous file extensions were detected99 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2293099

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.51
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%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin