84% login-redirect

Code Review | Login Redirect

WordPress plugin Login Redirect scored 84% from 54 tests.

About plugin

  • Plugin page: login-redirect
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 5.8.1
  • First release: Feb 24, 2014
  • Latest release: Apr 26, 2014
  • Number of updates: 13
  • Update frequency: every 4.7 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 11,313 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼173.48ms] Passed 4 tests

Analyzing server-side resources used by Login Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.22 ▲17.87
Dashboard /wp-admin3.08 ▲0.0348.82 ▲9.92
Posts /wp-admin/edit.php3.13 ▲0.0246.48 ▼9.79
Add New Post /wp-admin/post-new.php5.44 ▲0.0090.00 ▼695.78
Media Library /wp-admin/upload.php3.02 ▲0.0236.07 ▲1.72
Login Redirect /wp-admin/options-general.php?page=login-redirect-options2.9930.07

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Login Redirect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲7115.80 ▲0.228.88 ▼0.0850.10 ▼12.74
Dashboard /wp-admin2,994 ▲635.93 ▼0.14148.75 ▲6.74123.89 ▲2.18
Posts /wp-admin/edit.php2,744 ▲52.70 ▲0.0266.98 ▼5.6996.27 ▼3.78
Add New Post /wp-admin/post-new.php1,686 ▲318.74 ▼0.05393.02 ▼25.73118.21 ▲1.58
Media Library /wp-admin/upload.php1,815 ▲85.02 ▲0.01157.77 ▼4.27122.04 ▼3.61
Login Redirect /wp-admin/options-general.php?page=login-redirect-options1,0862.0858.4891.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 2 options in the database
    • login_redirect_type
    • login_redirect_customise_url

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/login-redirect/options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/login-redirect/login-redirect.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: login, redirect

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

The primary PHP file in "Login Redirect" version 1.0.5 is used by WordPress to initiate all plugin functionality
62 characters long description:
Redirect to a link after login. 登入後跳轉至特定鏈接

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected148 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File2141462

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin