94% 301-redirects

Code Review | 301 Redirects & 404 Error Log

WordPress plugin 301 Redirects & 404 Error Log scored 94% from 54 tests.

About plugin

  • Plugin page: 301-redirects
  • Plugin version: 1.01
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Apr 8, 2015
  • Latest release: Jan 25, 2022
  • Number of updates: 28
  • Update frequency: every 88.8 days
  • Top authors: WebFactory (82.14%)tonyspiro (21.43%)

Code review

54 tests

User reviews

25 reviews

Install metrics

20,000+ active / 108,295 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.06MB] [CPU: ▼324.18ms] Passed 4 tests

Server-side resources used by 301 Redirects & 404 Error Log
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.26 ▼0.2621.71 ▼97.02
Dashboard /wp-admin3.60 ▲0.1941.69 ▼1.08
Posts /wp-admin/edit.php3.42 ▼0.2331.61 ▼10.82
Add New Post /wp-admin/post-new.php7.06 ▲0.0897.49 ▼1,187.78
Media Library /wp-admin/upload.php3.47 ▲0.1731.06 ▲2.88
301 Redirects /wp-admin/options-general.php?page=301-redirects3.4540.06

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: 1 new table, 1 new option
New tables
wp_ts_redirects
New WordPress options
ts_301_redirection

Browser metrics Passed 4 tests

An overview of browser requirements for 301 Redirects & 404 Error Log
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,865 ▲11114.94 ▼0.186.49 ▼0.502.75 ▲0.15
Dashboard /wp-admin2,962 ▲1096.17 ▲0.07118.76 ▼20.59162.24 ▼6.07
Posts /wp-admin/edit.php2,662 ▼233.23 ▲0.0062.34 ▼2.48135.75 ▼11.25
Add New Post /wp-admin/post-new.php1,658 ▼10221.28 ▼1.44404.89 ▼32.86179.27 ▲26.63
Media Library /wp-admin/upload.php1,703 ▲85.47 ▼0.06147.66 ▼8.82187.61 ▼60.53
301 Redirects /wp-admin/options-general.php?page=301-redirects1,7833.6186.93317.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Interface 'tsdonatj\\UserAgent\\UserAgentInterface' not found in wp-content/plugins/301-redirects/lib/UserAgent/UserAgent.php:5

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)
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
9 plugin tags: seo, redirect url, redirect rules, redirects, 404...

301-redirects/301-redirects.php Passed 13 tests

Analyzing the main PHP file in "301 Redirects & 404 Error Log" version 1.01
60 characters long description:
Easily create & manage redirections, and view 404 error log.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,542 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12236124973
CSS37913398
JavaScript33713171

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.12
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces3
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods41
▷ Static methods1843.90%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants73
▷ Global constants00.00%
▷ Class constants73100.00%
▷ Public constants73100.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wf-flyout/icons/ucp.png16.30KB2.35KB▼ 85.58%
wf-flyout/icons/301-logo.png6.33KB3.09KB▼ 51.22%
img/301-black-logo.png3.38KB2.66KB▼ 21.48%
wf-flyout/icons/301-black-logo.png3.38KB2.66KB▼ 21.48%
img/wp-301-logo-full.png1.57KB1.49KB▼ 4.68%