94% simple-redirector

Code Review | Simple Redirector

WordPress plugin Simple Redirector scored 94% from 53 tests.

About plugin

  • Plugin page: simple-redirector
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 5.8.1
  • First release: Aug 18, 2021
  • Latest release: Aug 18, 2021
  • Number of updates: 2
  • Update frequency: every 2.0 days
  • Top authors: mastarachef (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 55 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼274.12ms] Passed 4 tests

Server-side resources used by Simple Redirector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1239.79 ▲22.10
Dashboard /wp-admin3.06 ▲0.0141.71 ▼1.85
Posts /wp-admin/edit.php3.11 ▲0.0041.14 ▲2.05
Add New Post /wp-admin/post-new.php5.42 ▼0.0194.43 ▼1,088.74
Media Library /wp-admin/upload.php3.00 ▼0.0130.85 ▼7.95

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Redirector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲9616.27 ▲0.727.30 ▼1.5749.38 ▲2.97
Dashboard /wp-admin2,959 ▲1095.89 ▲0.08151.19 ▲19.3797.61 ▼2.39
Posts /wp-admin/edit.php2,706 ▼02.68 ▼0.0165.78 ▼0.6490.45 ▼1.41
Add New Post /wp-admin/post-new.php1,653 ▲6518.83 ▼2.99370.76 ▲56.60106.79 ▼2.71
Media Library /wp-admin/upload.php1,769 ▼35.04 ▲0.04140.96 ▼4.79111.10 ▼10.58

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-redirector/simple-redirector.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: redirect, 404

simple-redirector/simple-redirector.php Passed 13 tests

The principal PHP file in "Simple Redirector" v. 1.0 is loaded by WordPress automatically on each request
25 characters long description:
All 404 Pages to Homepage

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 detected10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14810

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
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 1 test

Image compression Passed 1 test

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin