10% redirectto

Code Review | RedirectTo Plugin

WordPress plugin RedirectTo Plugin scored10%from 54 tests.

About plugin

  • Plugin page: redirectto
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2013
  • Latest release: Feb 25, 2013
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: wildiney (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,046 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'rt_install' not found or invalid function name

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

Server-side resources used by RedirectTo Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.88 ▼5.70
Dashboard /wp-admin3.32 ▲0.0243.94 ▼8.67
Posts /wp-admin/edit.php3.37 ▲0.0147.98 ▼1.59
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.80 ▼10.74
Media Library /wp-admin/upload.php3.24 ▲0.0133.29 ▼1.69

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for RedirectTo Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.59 ▼0.794.90 ▲3.1943.46 ▼0.30
Dashboard /wp-admin2,210 ▲225.85 ▼0.03103.71 ▼20.9239.57 ▼6.23
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0439.94 ▲3.9235.17 ▲0.31
Add New Post /wp-admin/post-new.php1,518 ▼123.24 ▼0.00684.19 ▼6.7358.33 ▼2.85
Media Library /wp-admin/upload.php1,395 ▲74.14 ▼0.0897.74 ▼8.7143.22 ▼2.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'rt_deactivate' not found or invalid function name
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/redirectto/redirectTo.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: redirect, plugin

redirectto/redirectTo.php 92% from 13 tests

"RedirectTo Plugin" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("redirectto.php" instead of "redirectTo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin60 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1142139
JavaScript13014
Markdown1104
CSS13113

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.11
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected