84% odihost-easy-redirect-301

Code Review | Easy 301 Redirects

WordPress plugin Easy 301 Redirects scored84%from 54 tests.

About plugin

  • Plugin page: odihost-easy-redi...
  • Plugin version: 1.33
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 23, 2015
  • Latest release: Oct 22, 2017
  • Number of updates: 11
  • Update frequency: every 69.2 days
  • Top authors: odihost (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /27,680 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.89ms] Passed 4 tests

A check of server-side resources used by Easy 301 Redirects
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.97 ▼5.75
Dashboard /wp-admin3.31 ▲0.0146.55 ▲0.75
Posts /wp-admin/edit.php3.36 ▲0.0146.28 ▼6.63
Add New Post /wp-admin/post-new.php5.90 ▲0.01112.52 ▲5.26
Media Library /wp-admin/upload.php3.24 ▲0.0133.55 ▲0.08
Easy 301 Redirects /wp-admin/options-general.php?page=simple301options3.2031.55
Easy 301 Redirects Creator /wp-admin/options-general.php?page=simple301optionscreator3.2028.56

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Easy 301 Redirects
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3713.20 ▼1.181.70 ▼0.2639.12 ▼2.89
Dashboard /wp-admin2,217 ▲325.86 ▼0.04100.80 ▼1.1638.25 ▼6.80
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0038.54 ▼2.2434.47 ▼4.11
Add New Post /wp-admin/post-new.php6,302 ▲4,76919.30 ▼4.06894.14 ▲290.2360.15 ▼2.54
Media Library /wp-admin/upload.php1,399 ▲84.24 ▲0.0496.24 ▼0.7440.56 ▼1.90
Easy 301 Redirects /wp-admin/options-general.php?page=simple301options8132.0423.7525.02
Easy 301 Redirects Creator /wp-admin/options-general.php?page=simple301optionscreator7862.0224.8827.52

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 2× 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/odihost-easy-redirect-301/includes/meta-box.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/odihost-easy-redirect-301/includes/meta-box.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: redirect, 301, easy 301 redirect

odihost-easy-redirect-301/easy-301-redirect.php 92% from 13 tests

The main PHP file in "Easy 301 Redirects" ver. 1.33 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("odihost-easy-redirect-301.php" instead of "easy-301-redirect.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 plugin201 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26497201

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG files were detected