84% safe-redirect-manager

Code Review | Safe Redirect Manager

WordPress plugin Safe Redirect Manager scored84%from 54 tests.

About plugin

  • Plugin page: safe-redirect-man...
  • Plugin version: 2.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Aug 27, 2012
  • Latest release: Sep 7, 2023
  • Number of updates: 53
  • Update frequency: every 76.0 days
  • Top authors: tlovett1 (62.26%)10upbot (15.09%)10up (13.21%)danielbachhuber (13.21%)helen (3.77%)

Code review

54 tests

User reviews

73 reviews

Install metrics

50,000+ active /1,325,214 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▼3.28ms] Passed 4 tests

An overview of server-side resources used by Safe Redirect Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2746.93 ▲5.21
Dashboard /wp-admin3.55 ▲0.2553.02 ▼1.54
Posts /wp-admin/edit.php3.67 ▲0.3150.38 ▼4.30
Add New Post /wp-admin/post-new.php6.13 ▲0.2588.69 ▼12.48
Media Library /wp-admin/upload.php3.47 ▲0.2443.03 ▲9.90

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Safe Redirect Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲6413.66 ▼0.921.75 ▼0.0443.64 ▲0.51
Dashboard /wp-admin2,210 ▲284.88 ▼0.00111.42 ▲3.7339.77 ▼3.15
Posts /wp-admin/edit.php2,099 ▲71.99 ▼0.0738.78 ▼1.5434.26 ▼2.74
Add New Post /wp-admin/post-new.php1,539 ▲2023.35 ▲0.43664.94 ▲77.1050.91 ▲7.75
Media Library /wp-admin/upload.php1,395 ▲74.19 ▲0.02108.85 ▲10.0045.21 ▼1.05

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/safe-redirect-manager/inc/classes/class-srm-post-type.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/safe-redirect-manager/inc/classes/class-srm-wp-cli.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: http redirects, safe http redirection, multisite redirects, redirect manager, redirects...

safe-redirect-manager/safe-redirect-manager.php Passed 13 tests

The primary PHP file in "Safe Redirect Manager" version 2.1.0 is used by WordPress to initiate all plugin functionality
40 characters long description:
Easily and safely manage HTTP redirects.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,435 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP63217641,302
JavaScript19388
CSS19045

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity41.25
▷ Minimum class complexity20.00
▷ Maximum class complexity63.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods46
▷ Static methods613.04%
▷ Public methods4291.30%
▷ Protected methods12.17%
▷ Private methods36.52%
Functions18
▷ Named functions1477.78%
▷ Anonymous functions422.22%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin