84% wp-after-login-redirect-advanced

Code Review | After Login Redirect

WordPress plugin After Login Redirect scored84%from 54 tests.

About plugin

  • Plugin page: wp-after-login-re...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: May 1, 2018
  • Latest release: Aug 27, 2023
  • Number of updates: 11
  • Update frequency: every 176.7 days
  • Top authors: sajjad67 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /2,716 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.11ms] Passed 4 tests

A check of server-side resources used by After Login Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.04 ▼13.15
Dashboard /wp-admin3.32 ▼0.0354.17 ▼7.58
Posts /wp-admin/edit.php3.37 ▲0.0152.10 ▲7.00
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.85 ▼16.21
Media Library /wp-admin/upload.php3.26 ▲0.0339.15 ▲4.50

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for After Login Redirect
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲5614.39 ▲0.181.97 ▲0.3937.50 ▼2.65
Dashboard /wp-admin2,223 ▲465.74 ▲0.1584.87 ▼0.5338.15 ▼3.57
Posts /wp-admin/edit.php2,128 ▲282.44 ▲0.4140.37 ▲6.0636.06 ▼2.33
Add New Post /wp-admin/post-new.php1,559 ▲3323.50 ▼0.19605.36 ▼63.7234.23 ▼18.96
Media Library /wp-admin/upload.php1,429 ▲294.55 ▲0.3797.34 ▼9.6143.24 ▼4.10

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 10× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-after-login-redirect-advanced/includes/enqueue.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-after-login-redirect-advanced/includes/functions.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/wp-after-login-redirect-advanced/includes/templates/id.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/wp-after-login-redirect-advanced/includes/templates/username.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-after-login-redirect-advanced/includes/dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/wp-after-login-redirect-advanced/includes/templates/lastname.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/wp-after-login-redirect-advanced/includes/templates/email.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/wp-after-login-redirect-advanced/includes/templates/firstname.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-after-login-redirect-advanced/public/redirect.php:94
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_editable_roles() in wp-content/plugins/wp-after-login-redirect-advanced/includes/templates/role.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-after-login-redirect-advanced/wp-login-redirect-advanced.php 92% from 13 tests

The main PHP file in "After Login Redirect" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-after-login-redirect-advanced.php" instead of "wp-login-redirect-advanced.php")

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
No dangerous file extensions were detected8,260 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,03377,678
PHP1211127471
JavaScript33610111

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.70
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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