78% xtoool-redirecter

Code Review | Xtoool Redirecter

WordPress plugin Xtoool Redirecter scored78%from 54 tests.

About plugin

  • Plugin page: xtoool-redirecter
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 27, 2022
  • Latest release: Jan 27, 2022
  • Number of updates: 5
  • Update frequency: every 3.6 days
  • Top authors: xtoool (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /255 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.47MB] [CPU: ▼18.48ms] Passed 4 tests

This is a short check of server-side resources used by Xtoool Redirecter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.76 ▼0.7010.91 ▼33.02
Dashboard /wp-admin4.25 ▲0.9540.90 ▼10.43
Posts /wp-admin/edit.php4.32 ▲0.9645.40 ▼3.54
Add New Post /wp-admin/post-new.php6.56 ▲0.6780.89 ▼26.91
Media Library /wp-admin/upload.php4.26 ▲1.0344.49 ▲9.33

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 170 new files
Database: no new tables, 8 new options
New WordPress options
recovery_mode_email_last_sent
widget_recent-posts
widget_recent-comments
redirection_options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Xtoool Redirecter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,461 ▼1,32512.77 ▼1.602.38 ▲0.5544.48 ▼0.34
Dashboard /wp-admin854 ▼1,3261.36 ▼4.2513.09 ▼77.1120.53 ▼26.05
Posts /wp-admin/edit.php865 ▼1,2381.51 ▼0.526.54 ▼29.1716.32 ▼15.74
Add New Post /wp-admin/post-new.php590 ▼9491.71 ▼16.6419.06 ▼629.516.71 ▼49.33
Media Library /wp-admin/upload.php750 ▼6531.71 ▼2.4521.59 ▼80.7222.15 ▼24.26
Redirecter /wp-admin/redirection.php260.420.1014.98

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 54× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Red_Match' not found in wp-content/plugins/xtoool-redirecter/matches/user-agent.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Red_Module' not found in wp-content/plugins/xtoool-redirecter/modules/apache.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Red_Database_Upgrader' not found in wp-content/plugins/xtoool-redirecter/database/schema/220.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Red_Match' not found in wp-content/plugins/xtoool-redirecter/matches/http-header.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Red_Match' not found in wp-content/plugins/xtoool-redirecter/matches/http-header.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Red_Match' not found in wp-content/plugins/xtoool-redirecter/matches/url.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Red_Database_Upgrader' not found in wp-content/plugins/xtoool-redirecter/database/schema/233.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Redirection_Api_Filter_Route' not found in wp-content/plugins/xtoool-redirecter/api/api-group.php:137
    • > PHP Fatal error
      Uncaught Error: Class 'Red_FileIO' not found in wp-content/plugins/xtoool-redirecter/fileio/rss.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Red_Module' not found in wp-content/plugins/xtoool-redirecter/modules/nginx.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/redirection.php
    • > Network (severe)
    wp-admin/redirection.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === xtoool-redirecter === )
You can look at the official readme.txt

xtoool-redirecter/redirection.php 85% from 13 tests

The main PHP file in "Xtoool Redirecter" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("xtoool-redirecter.php" instead of "redirection.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
No dangerous file extensions were detected37,976 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PO File2514,51616,33929,386
PHP882,2743,7718,504
CSS18060
JSON250025
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity13.16
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits2
Classes94
▷ Abstract classes66.38%
▷ Concrete classes8893.62%
▷ Final classes00.00%
Methods713
▷ Static methods9913.88%
▷ Public methods51371.95%
▷ Protected methods486.73%
▷ Private methods15221.32%
Functions31
▷ Named functions1548.39%
▷ Anonymous functions1651.61%
Constants72
▷ Global constants1419.44%
▷ Class constants5880.56%
▷ Public constants58100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/GitHub-Mark-64px.png2.56KB1.51KB▼ 41.07%