10% redirection-io

Code Review | redirection.io

WordPress plugin redirection.io scored10%from 54 tests.

About plugin

  • Plugin page: redirection-io
  • Plugin version: 0.2.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2019
  • Latest release: May 14, 2019
  • Number of updates: 6
  • Update frequency: every 10.0 days
  • Top authors: redirectionio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /500 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method RedirectionIO\Client\Wordpress\RedirectionIO::setUp() should not be called statically

Server metrics [RAM: ▲0.16MB] [CPU: ▼2.58ms] Passed 4 tests

This is a short check of server-side resources used by redirection.io
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1537.32 ▼0.34
Dashboard /wp-admin3.47 ▲0.1645.01 ▼2.91
Posts /wp-admin/edit.php3.58 ▲0.2249.18 ▲5.26
Add New Post /wp-admin/post-new.php6.07 ▲0.1886.31 ▼8.31
Media Library /wp-admin/upload.php3.39 ▲0.1634.16 ▲1.23
redirection.io /wp-admin/options-general.php?page=redirectionio3.4331.46

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
redirectionio

Browser metrics Passed 4 tests

Checking browser requirements for redirection.io
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3713.67 ▼0.901.57 ▼0.2740.05 ▲2.14
Dashboard /wp-admin2,214 ▲235.83 ▼0.0795.33 ▼3.5340.43 ▼1.86
Posts /wp-admin/edit.php2,100 ▲112.02 ▼0.0439.18 ▲2.6636.03 ▼0.11
Add New Post /wp-admin/post-new.php1,521 ▼017.64 ▼5.78692.56 ▲90.5659.26 ▲5.92
Media Library /wp-admin/upload.php1,393 ▲84.23 ▼0.0295.15 ▼4.3742.22 ▼3.57
redirection.io /wp-admin/options-general.php?page=redirectionio9092.0622.3531.23

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RedirectionIO\\Client\\Sdk\\Command\\Command' not found in wp-content/plugins/redirection-io/vendor/redirectionio/proxy-sdk/src/Command/MatchCommand.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RedirectionIO\\Client\\Sdk\\Command\\Command' not found in wp-content/plugins/redirection-io/vendor/redirectionio/proxy-sdk/src/Command/LogCommand.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'RedirectionIO\\Client\\Sdk\\Command\\Command' not found in wp-content/plugins/redirection-io/vendor/redirectionio/proxy-sdk/src/Command/MatchWithResponseCommand.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'RedirectionIO\\Client\\Sdk\\Exception\\ExceptionInterface' not found in wp-content/plugins/redirection-io/vendor/redirectionio/proxy-sdk/src/Exception/TimeoutException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/redirection-io/vendor/psr/log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/redirection-io/Tests/RedirectionIOTest.php:61
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/redirection-io/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'RedirectionIO\\Client\\Sdk\\Command\\CommandInterface' not found in wp-content/plugins/redirection-io/vendor/redirectionio/proxy-sdk/src/Command/Command.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/redirection-io/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'RedirectionIO\\Client\\Sdk\\Exception\\ExceptionInterface' not found in wp-content/plugins/redirection-io/vendor/redirectionio/proxy-sdk/src/Exception/BadConfigurationException.php:5

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: meta tags, redirect, seo, redirection, redirectionio...

redirection-io/autoload.php 77% from 13 tests

"redirection.io" version 0.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/wordpress/languages.")
  • Main file name: The principal plugin file should be the same as the plugin slug ("redirection-io.php" instead of "autoload.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin2,866 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP375117212,053
JSON400236
Markdown61050220
PO File12626133
JavaScript12751130
XML210062
CSS17032

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity6.65
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.13
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces4
Traits2
Classes25
▷ Abstract classes312.00%
▷ Concrete classes2288.00%
▷ Final classes00.00%
Methods167
▷ Static methods127.19%
▷ Public methods14788.02%
▷ Protected methods00.00%
▷ Private methods2011.98%
Functions17
▷ Named functions1058.82%
▷ Anonymous functions741.18%
Constants10
▷ Global constants110.00%
▷ Class constants990.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin