100% redirector

Code Review | Redirector

WordPress plugin Redirector scored 100% from 54 tests.

About plugin

  • Plugin page: redirector
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 5.8.1
  • First release: Nov 5, 2008
  • Latest release: Aug 11, 2014
  • Number of updates: 28
  • Update frequency: every 75.2 days
  • Top authors: xzeed (60.71%)Horttcore (42.86%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10,000+ active / 75,944 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼130.77ms] Passed 4 tests

This is a short check of server-side resources used by Redirector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1345.11 ▲22.03
Dashboard /wp-admin3.13 ▲0.0856.65 ▲20.53
Posts /wp-admin/edit.php3.18 ▲0.0848.68 ▲0.63
Add New Post /wp-admin/post-new.php5.49 ▲0.0692.40 ▼553.69
Media Library /wp-admin/upload.php3.08 ▲0.0743.71 ▲9.47

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 26 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Redirector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.30 ▲0.7210.58 ▼0.5750.39 ▲4.37
Dashboard /wp-admin2,967 ▲335.88 ▼0.09151.12 ▲0.16131.01 ▲18.28
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0170.38 ▼0.8599.72 ▼3.72
Add New Post /wp-admin/post-new.php1,681 ▼218.37 ▼0.30438.16 ▲44.05132.82 ▲15.19
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.03180.04 ▲36.49145.48 ▲27.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Meta box - No redirection), #2 (Meta box - Select post ( any post type )), #3 (Modal box - Select post ( any post type ) with most recent posts), #4 (Modal box - Search post ( any post type )), #5 (Meta box - Selected post ( any post type )), #6 (Meta box - Custom URL), #7 (Meta box - First child element), #8 (Meta box - SSL)
The official readme.txt might help

redirector/redirector.php Passed 13 tests

The primary PHP file in "Redirector" version 3.0.1 is used by WordPress to initiate all plugin functionality
48 characters long description:
Redirect any page to an internal or external URL

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin656 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4246180372
PO File34692149
JavaScript15712111
CSS16724

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity30.00
▷ Minimum class complexity14.00
▷ Maximum class complexity46.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods16
▷ Static methods00.00%
▷ Public methods1381.25%
▷ Protected methods318.75%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png2.76KB1.70KB▼ 38.59%
screenshot-7.png2.93KB1.89KB▼ 35.47%
screenshot-3.png13.34KB10.64KB▼ 20.28%
screenshot-1.png2.49KB1.46KB▼ 41.44%
screenshot-5.png2.99KB1.86KB▼ 37.81%