10% redirect-to-url

Code Review | Redirect To URL

WordPress plugin Redirect To URL scored10%from 54 tests.

About plugin

  • Plugin page: redirect-to-url
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2014
  • Latest release: Mar 30, 2015
  • Number of updates: 58
  • Update frequency: every 3.4 days
  • Top authors: MarcelFagas (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /6,631 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/redirect-to-url/redirect-to-url.php+19
    Undefined variable: callback

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.67ms] Passed 4 tests

This is a short check of server-side resources used by Redirect To URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.07 ▼38.93
Dashboard /wp-admin2.09 ▼1.215.60 ▼46.61
Posts /wp-admin/edit.php2.09 ▼1.265.99 ▼45.95
Add New Post /wp-admin/post-new.php2.09 ▼3.796.39 ▼83.19
Media Library /wp-admin/upload.php2.09 ▼1.146.01 ▼28.73

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
redirect2url_url_history
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Redirect To URL
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.74 ▲0.371.76 ▼0.1340.01 ▼9.22
Dashboard /wp-admin2,203 ▲214.86 ▲0.03111.30 ▲4.4542.64 ▲0.88
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0239.44 ▼1.5235.63 ▲0.14
Add New Post /wp-admin/post-new.php6,245 ▲4,73125.67 ▲8.15917.70 ▲222.7756.99 ▲3.80
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0597.12 ▼6.1340.69 ▼6.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/redirect-to-url/redirect-to-url.php+19
    Undefined variable: callback
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at 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/redirect-to-url/redirect-to-url.php:16

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 93% from 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
7 plugin tags: external website, external link, open in new window, redirection, open in new tab...

redirect-to-url/redirect-to-url.php 85% from 13 tests

"Redirect To URL" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 141 characters long)

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
There were no executable files found in this plugin93 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2353293

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
PNG images were not found in this plugin