68% login-external-redirect

Code Review | Login External Redirect

WordPress plugin Login External Redirect scored68%from 54 tests.

About plugin

  • Plugin page: login-external-re...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Apr 7, 2016
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: adoorunni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,136 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.01ms] Passed 4 tests

Analyzing server-side resources used by Login External Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.70 ▼41.87
Dashboard /wp-admin2.10 ▼1.256.35 ▼53.09
Posts /wp-admin/edit.php2.10 ▼1.266.34 ▼43.52
Add New Post /wp-admin/post-new.php2.10 ▼3.795.83 ▼85.57
Media Library /wp-admin/upload.php2.10 ▼1.135.96 ▼24.93
Redirect /wp-admin/options-general.php?page=login-external-redirect2.105.50

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Login External Redirect: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.73 ▼1.011.80 ▼0.2643.53 ▼5.54
Dashboard /wp-admin2,213 ▲254.84 ▼1.09112.19 ▲5.0240.07 ▼2.60
Posts /wp-admin/edit.php2,096 ▲42.06 ▲0.0239.07 ▼4.4335.46 ▼1.35
Add New Post /wp-admin/post-new.php1,536 ▲323.10 ▲0.15656.89 ▲4.3153.27 ▼6.42
Media Library /wp-admin/upload.php1,392 ▲74.21 ▼0.0694.55 ▼9.7140.69 ▼7.53
Redirect /wp-admin/options-general.php?page=login-external-redirect8422.0623.9929.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/login-external-redirect/login-external-redirect.php+46
    Use of undefined constant HTTP_HOST - assumed 'HTTP_HOST' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=login-external-redirect
    • > Warning in wp-content/plugins/login-external-redirect/login-external-redirect.php+46
    Use of undefined constant HTTP_HOST - assumed 'HTTP_HOST' (this will throw an Error in a future version of PHP)

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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/login-external-redirect/login-external-redirect.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: user logged in wp-admin, redirect non logged in user to another site, redirect, login

login-external-redirect/login-external-redirect.php Passed 13 tests

"Login External Redirect" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
90 characters long description:
This plugin can redirect non users or not signed in users to any external or internal url.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11349122

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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