94% eelv-redirection

Code Review | Simple Redirection

WordPress plugin Simple Redirection scored 94% from 54 tests.

About plugin

  • Plugin page: eelv-redirection
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8
  • WordPress version: 5.8.1
  • First release: Oct 19, 2012
  • Latest release: Nov 26, 2021
  • Number of updates: 31
  • Update frequency: every 107.3 days
  • Top authors: bastho (83.87%)ecolosites (19.35%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 3,890 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by Simple Redirection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0130.72 ▲8.23
Dashboard /wp-admin3.06 ▲0.0031.68 ▼8.69
Posts /wp-admin/edit.php3.12 ▲0.0132.29 ▼5.01
Add New Post /wp-admin/post-new.php5.43 ▼0.0168.22 ▼603.29
Media Library /wp-admin/upload.php3.01 ▲0.0124.14 ▲0.72
Redirection /wp-admin/options-general.php?page=eelv_redirection2.9819.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Simple Redirection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲7015.59 ▼0.215.39 ▼3.0278.51 ▲0.94
Dashboard /wp-admin2,938 ▲396.11 ▼0.01115.37 ▼21.54162.34 ▼11.27
Posts /wp-admin/edit.php2,748 ▲83.24 ▲0.0263.12 ▼3.25141.30 ▼0.70
Add New Post /wp-admin/post-new.php3,810 ▲11118.52 ▲0.31460.69 ▼2.09164.31 ▼2.57
Media Library /wp-admin/upload.php1,757 ▲85.49 ▼0.02140.86 ▼21.66186.08 ▼15.80
Redirection /wp-admin/options-general.php?page=eelv_redirection1,1322.3754.72119.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 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/eelv-redirection/eelv_redirection.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt might help

eelv-redirection/eelv_redirection.php 92% from 13 tests

The primary PHP file in "Simple Redirection" version 1.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("eelv-redirection.php" instead of "eelv_redirection.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
There were no executable files found in this plugin880 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
SVG222711
PHP11215128
PO File1131541

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
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
Namespaces1
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-512x512.png23.78KB9.08KB▼ 61.81%
assets/banner-1544x500.png29.15KB10.49KB▼ 64.02%
assets/banner-772x250.png13.13KB5.73KB▼ 56.38%
assets/icon-256x256.png11.94KB5.29KB▼ 55.67%