68% kt-redirect-url

Code Review | KT Redirect URL

WordPress plugin KT Redirect URL scored 68% from 54 tests.

About plugin

  • Plugin page: kt-redirect-url
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.8
  • WordPress version: 6.3.1
  • First release: Jul 11, 2017
  • Latest release: Jul 14, 2017
  • Number of updates: 14
  • Update frequency: every 0.7 days
  • Top authors: KTBrothers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 775 total downloads

Benchmarks

Plugin footprint 65% 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.95MB] [CPU: ▼34.10ms] Passed 4 tests

Analyzing server-side resources used by KT Redirect URL
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.07 ▲0.17
Dashboard /wp-admin3.00 ▼0.3123.68 ▼26.10
Posts /wp-admin/edit.php3.00 ▼0.3624.03 ▼23.52
Add New Post /wp-admin/post-new.php3.00 ▼2.8925.81 ▼72.79
Media Library /wp-admin/upload.php3.00 ▼0.2321.05 ▼13.99
Redirect Setting /wp-admin/admin.php?page=rdct_add3.0022.38

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 24 new files
Database: 1 new table, 6 new options
New tables
wp_kt_redirect
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for KT Redirect URL
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.29 ▼1.091.67 ▼0.3446.09 ▼3.87
Dashboard /wp-admin2,222 ▲314.80 ▼0.06109.87 ▲1.8242.51 ▼0.91
Posts /wp-admin/edit.php2,105 ▲162.03 ▲0.0346.00 ▲8.6134.64 ▲1.07
Add New Post /wp-admin/post-new.php1,550 ▲1723.42 ▲0.20641.01 ▼37.5974.84 ▲21.91
Media Library /wp-admin/upload.php1,404 ▲134.18 ▲0.0194.88 ▼9.9646.91 ▲0.21
Redirect Setting /wp-admin/admin.php?page=rdct_add1,0532.6136.3555.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+15
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Warning in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+16
    sizeof(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+28
    Trying to get property 'id' of non-object
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+29
    Trying to get property 'rdct_title' of non-object
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+30
    Trying to get property 'rdct_dest_link' of non-object
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+31
    Trying to get property 'rdct_assign_posts' of non-object
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+32
    Trying to get property 'rdct_status' of non-object
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+33
    Trying to get property 'rdct_menus' of non-object
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+34
    Trying to get property 'rdct_time' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+106
    Undefined variable: cta_post_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rdct_add
    • > Notice in wp-content/plugins/kt-redirect-url/include/kt-rdct-new.php+137
    Undefined variable: cta_bt_status

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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/kt-redirect-url/uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: seo optimized, google rank, 404 removal, url redirect, 301

kt-redirect-url/kt-rdct.php 92% from 13 tests

"KT Redirect URL" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kt-redirect-url.php" instead of "kt-rdct.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected6,735 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,4785,9496,034
PHP43114355
CSS410380346

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity8.33
▷ Minimum method complexity5.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/forward_enabled.png1.35KB0.58KB▼ 56.96%
images/forward_enabled_hover.png1.35KB0.58KB▼ 56.93%
images/back_enabled_hover.png1.34KB0.60KB▼ 55.56%
images/back_enabled.png1.35KB0.60KB▼ 55.69%
images/sort_desc_disabled.png1.02KB0.25KB▼ 75.98%