72% goto-redirect

Code Review | GoTo Redirect

WordPress plugin GoTo Redirect scored72%from 54 tests.

About plugin

  • Plugin page: goto-redirect
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2012
  • Latest release: Jun 9, 2012
  • Number of updates: 2
  • Update frequency: every 5.5 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,747 total downloads

Benchmarks

Plugin footprint 82% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.63MB] [CPU: ▼18.95ms] Passed 4 tests

A check of server-side resources used by GoTo Redirect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0944.89 ▼0.77
Dashboard /wp-admin3.39 ▲0.0458.75 ▼4.26
Posts /wp-admin/edit.php3.50 ▲0.1451.84 ▲0.17
Add New Post /wp-admin/post-new.php3.15 ▼2.7328.59 ▼70.94
Media Library /wp-admin/upload.php3.31 ▲0.0837.15 ▲1.64
GoTos /wp-admin/edit.php?post_type=goto3.3535.08
Add New /wp-admin/post-new.php?post_type=goto3.1530.49

Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/goto-redirect/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
recovery_mode_email_last_sent
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by GoTo Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲9813.21 ▼1.541.97 ▼0.0938.20 ▼6.70
Dashboard /wp-admin2,232 ▲624.81 ▼0.88105.69 ▲3.3373.76 ▲32.01
Posts /wp-admin/edit.php2,126 ▲261.98 ▼0.0638.15 ▲0.0435.42 ▼4.30
Add New Post /wp-admin/post-new.php45 ▼1,5000.44 ▼22.810.09 ▼675.348.82 ▼46.84
Media Library /wp-admin/upload.php1,420 ▲204.27 ▲0.06118.36 ▲20.5747.00 ▲0.81
GoTos /wp-admin/edit.php?post_type=goto1,1252.0935.4434.58
Add New /wp-admin/post-new.php?post_type=goto450.440.089.27

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
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=goto
    • > Error in wp-content/plugins/goto-redirect/goto_redirects.php+137
    Uncaught ArgumentCountError: Too few arguments to function GoToRedirect::update_key_slug(), 1 passed in wp-includes/class-wp-hook.php on line 312 and exactly 2 expected in wp-content/plugins/goto-redirect/goto_redirects.php:137
    Stack trace:
    #0 wp-includes/class-wp-hook.php(312): GoToRedirect->update_key_slug()
    #1 wp-includes/plugin.php(205): WP_Hook->apply_filters()
    #2 wp-includes/post.php(4452): apply_filters()
    #3 wp-admin/includes/post.php(745): wp_insert_post()
    #4 wp-admin/post-new.php(66): get_default_post_to_edit()
    #5 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/goto-redirect/goto_redirects.php:45

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=goto
    • > Network (severe)
    wp-admin/post-new.php?post_type=goto - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (GoTo url creation screen), #2 (GoTo urls over view.)
The official readme.txt might help

goto-redirect/goto_redirects.php 92% from 13 tests

The entry point to "GoTo Redirect" version 0.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("goto-redirect.php" instead of "goto_redirects.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin322 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14768322

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png28.26KB10.40KB▼ 63.18%
screenshot-2.png77.94KB26.02KB▼ 66.62%