94% wp-redirect-url

Code Review | WP Redirect url

WordPress plugin WP Redirect url scored 94% from 54 tests.

About plugin

  • Plugin page: wp-redirect-url
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 5.9.2
  • First release: Dec 12, 2020
  • Latest release: Dec 12, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: arafatrahmanbd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 176 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by WP Redirect url
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0366.72 ▲15.94
Dashboard /wp-admin3.44 ▲0.0335.52 ▲1.68
Posts /wp-admin/edit.php3.67 ▲0.0338.46 ▲0.69
Add New Post /wp-admin/post-new.php6.91 ▼0.0695.27 ▼1,191.25
Media Library /wp-admin/upload.php3.32 ▲0.0325.85 ▲0.30

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: 1 new table, no new options
New tables
wpru_dbtable

Browser metrics Passed 4 tests

A check of browser resources used by WP Redirect url
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,811 ▲5715.60 ▼0.315.59 ▼0.142.22 ▼0.62
Dashboard /wp-admin2,919 ▲585.98 ▼0.19116.57 ▼15.05178.37 ▲13.88
Posts /wp-admin/edit.php2,730 ▲423.00 ▼0.2462.96 ▲0.46142.38 ▼0.29
Add New Post /wp-admin/post-new.php1,990 ▲32921.10 ▲4.38422.57 ▲12.58155.89 ▼1.50
Media Library /wp-admin/upload.php1,737 ▲395.48 ▼0.03127.54 ▼11.59208.16 ▲20.47

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPRU_settings' not found in wp-content/plugins/wp-redirect-url/admin/wpru-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-redirect-url/views/wpru-settings-view.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: 404, wp redirect url, 301 redirect, 302 redirect, redirection...

wp-redirect-url/wp-redirect-url.php 92% from 13 tests

The main PHP script in "WP Redirect url" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")

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
Success! There were no dangerous files found in this plugin393 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP48310214
CSS1370139
JavaScript114029
SVG10011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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