84% 301-redirects

Code Review | 301 Redirects & 404 Error Log

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

About plugin

  • Plugin page: 301-redirects
  • Plugin version: 1.02
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 8, 2015
  • Latest release: Aug 10, 2023
  • Number of updates: 34
  • Update frequency: every 89.7 days
  • Top authors: WebFactory (85.29%)tonyspiro (17.65%)

Code review

54 tests

User reviews

26 reviews

Install metrics

20,000+ active /129,373 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by 301 Redirects & 404 Error Log
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.01 ▼0.4519.39 ▼24.55
Dashboard /wp-admin3.51 ▲0.2150.18 ▼0.80
Posts /wp-admin/edit.php3.37 ▲0.0134.04 ▼23.36
Add New Post /wp-admin/post-new.php6.09 ▲0.2085.96 ▼9.62
Media Library /wp-admin/upload.php3.43 ▲0.2036.39 ▲1.87
301 Redirects /wp-admin/options-general.php?page=301-redirects3.4342.75

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 27 new files
Database: 1 new table, 7 new options
New tables
wp_ts_redirects
New WordPress options
can_compress_scripts
ts_301_redirection
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is 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 /2,838 ▲7714.42 ▲0.071.64 ▼0.2541.17 ▼3.41
Dashboard /wp-admin2,244 ▲765.51 ▼0.0591.61 ▼5.0244.79 ▲3.97
Posts /wp-admin/edit.php2,101 ▲11.99 ▲0.0038.06 ▼4.3534.33 ▼3.01
Add New Post /wp-admin/post-new.php1,537 ▲1118.27 ▼5.39629.28 ▲6.1167.35 ▲17.15
Media Library /wp-admin/upload.php1,407 ▲104.26 ▲0.0397.09 ▼7.7444.59 ▼4.38
301 Redirects /wp-admin/options-general.php?page=301-redirects1,4222.4353.98128.57

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: redirect url, 404 error, 404 redirect, 301 redirect, redirects...

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

The main PHP script in "301 Redirects & 404 Error Log" version 1.02 is automatically included on every request by WordPress
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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,827 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP122541251,258
CSS37913398
JavaScript33713171

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity36.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%
Methods42
▷ Static methods1945.24%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants73
▷ Global constants00.00%
▷ Class constants73100.00%
▷ Public constants73100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/301-black-logo.png3.38KB2.66KB▼ 21.48%
wf-flyout/icons/301-logo.png6.33KB3.09KB▼ 51.22%
wf-flyout/icons/wp-ssl.png13.01KB6.69KB▼ 48.56%
img/wp-301-logo-full.png1.57KB1.49KB▼ 4.68%
wf-flyout/icons/ucp.png16.30KB2.35KB▼ 85.58%