84% 404-to-301-redirect-by-felix

Code Review | 404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira

WordPress plugin 404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira scored84%from 54 tests.

About plugin

  • Plugin page: 404-to-301-redire...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.6
  • WordPress version: 6.3.1
  • First release: Feb 11, 2020
  • Latest release: Jan 4, 2021
  • Number of updates: 23
  • Update frequency: every 16.8 days
  • Top authors: devfelixmoira (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,693 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼5.36ms] Passed 4 tests

Analyzing server-side resources used by 404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0826.38 ▼13.29
Dashboard /wp-admin3.31 ▲0.0148.95 ▲1.53
Posts /wp-admin/edit.php3.36 ▲0.0043.99 ▼1.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0089.91 ▼6.12
Media Library /wp-admin/upload.php3.24 ▲0.0032.22 ▼0.66

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

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

Browser metrics Passed 4 tests

404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,453 ▼30814.26 ▼0.300.79 ▼0.840.08 ▼38.21
Dashboard /wp-admin2,198 ▲215.55 ▼0.0585.50 ▼3.3739.53 ▼5.48
Posts /wp-admin/edit.php2,100 ▲32.04 ▲0.0937.83 ▲0.5131.51 ▼3.74
Add New Post /wp-admin/post-new.php1,536 ▲818.27 ▼5.08630.61 ▼33.0076.62 ▲27.08
Media Library /wp-admin/upload.php1,394 ▼34.24 ▲0.0497.34 ▲0.5849.95 ▲5.02

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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)
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
  • 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/404-to-301-redirect-by-felix/yrd-404-to-301.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 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
3 plugin tags: 404-to-301, 404, 301

404-to-301-redirect-by-felix/yrd-404-to-301.php 92% from 13 tests

The primary PHP file in "404 to 301 – Redirect, WordPress Redirection plugin By Felix Moira" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("404-to-301-redirect-by-felix.php" instead of "yrd-404-to-301.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin13 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13813

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ 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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin