84% simple-post-redirect

Code Review | Simple Page Redirect

WordPress plugin Simple Page Redirect scored84%from 54 tests.

About plugin

  • Plugin page: simple-post-redirect
  • Plugin version: 1.6.7
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 30, 2017
  • Latest release: Nov 10, 2023
  • Number of updates: 20
  • Update frequency: every 110.2 days
  • Top authors: imemine (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

6,000+ active /47,811 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.50ms] Passed 4 tests

Analyzing server-side resources used by Simple Page Redirect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.92 ▲2.54
Dashboard /wp-admin3.32 ▲0.0246.57 ▲3.76
Posts /wp-admin/edit.php3.37 ▲0.0243.93 ▲2.27
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.84 ▼13.17
Media Library /wp-admin/upload.php3.25 ▲0.0234.34 ▼1.62

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Simple Page Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.67 ▲0.391.76 ▲0.0642.24 ▲0.76
Dashboard /wp-admin2,195 ▲215.68 ▲0.0396.32 ▲4.0443.16 ▲3.67
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0735.83 ▲1.6431.81 ▼5.94
Add New Post /wp-admin/post-new.php6,226 ▲4,70025.95 ▲2.77862.93 ▲176.4564.17 ▲14.57
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0395.87 ▼17.9841.88 ▼4.74

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-post-redirect/simple-post-redirect.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

simple-post-redirect/simple-post-redirect.php Passed 13 tests

The main PHP file in "Simple Page Redirect" ver. 1.6.7 adds more information about the plugin and also serves as the entry point for this plugin
99 characters long description:
This plugin allows you to make simple redirects of single pages of any custom post type to any url.

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
Success! There were no dangerous files found in this plugin100 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1202869
PO File17731

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin