84% mp-smart-redirect

Code Review | MP smart redirect: Simple 404 redirecter, without entering 404 pages and redirects!

WordPress plugin MP smart redirect: Simple 404 redirecter, without entering 404 pages and redirects! scored84%from 54 tests.

About plugin

  • Plugin page: mp-smart-redirect
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7+
  • WordPress version: 6.3.1
  • First release: Jul 13, 2014
  • Latest release: Aug 30, 2014
  • Number of updates: 4
  • Update frequency: every 12.0 days
  • Top authors: Mark Puts (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

60+ active /2,946 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.01MB] [CPU: ▼2.68ms] Passed 4 tests

Analyzing server-side resources used by MP smart redirect: Simple 404 redirecter, without entering 404 pages and redirects!
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.36 ▲1.19
Dashboard /wp-admin3.31 ▲0.0151.00 ▲2.37
Posts /wp-admin/edit.php3.37 ▲0.0145.11 ▼2.08
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.95 ▼12.19
Media Library /wp-admin/upload.php3.24 ▲0.0135.39 ▲4.69

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

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

Browser metrics Passed 4 tests

MP smart redirect: Simple 404 redirecter, without entering 404 pages and redirects!: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.051.71 ▲0.1243.91 ▲3.68
Dashboard /wp-admin2,203 ▲155.83 ▲0.9497.02 ▼7.8339.35 ▼6.68
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0534.00 ▼3.1436.94 ▲3.91
Add New Post /wp-admin/post-new.php1,533 ▼923.35 ▼0.13666.19 ▼15.4053.89 ▼1.98
Media Library /wp-admin/upload.php1,385 ▲64.21 ▲0.03112.26 ▲12.2548.54 ▼1.14

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mp-smart-redirect/mp-smart-redirect.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: redirect 301, 404, 404 redirect, redirect

mp-smart-redirect/mp-smart-redirect.php Passed 13 tests

The main file in "MP smart redirect: Simple 404 redirecter, without entering 404 pages and redirects!" v. 0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
132 characters long description:
Try to redirect 404 to new/right URL, using the URI segments to find the right page. When a page is found 301 redirect to that page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1152728

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.58
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected