78% login-and-logout-redirect

Code Review | Login and Logout Redirect

WordPress plugin Login and Logout Redirect scored78%from 54 tests.

About plugin

  • Plugin page: login-and-logout-...
  • Plugin version: 2.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2016
  • Latest release: Oct 8, 2023
  • Number of updates: 41
  • Update frequency: every 69.1 days
  • Top authors: patilswapnilv (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

7,000+ active /71,448 total downloads

Benchmarks

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
Install script ran successfully

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

Analyzing server-side resources used by Login and Logout Redirect
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0333.61 ▼4.53
Dashboard /wp-admin3.33 ▼0.0148.66 ▼14.40
Posts /wp-admin/edit.php3.38 ▲0.0348.05 ▼7.89
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.54 ▼11.80
Media Library /wp-admin/upload.php3.25 ▲0.0335.41 ▲1.67

Server storage [IO: ▲0.08MB] [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: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Login and Logout Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13013.31 ▼1.057.27 ▲5.8237.18 ▼1.44
Dashboard /wp-admin2,199 ▲255.58 ▲0.0690.04 ▲4.1540.41 ▲2.38
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0438.93 ▼1.3534.77 ▼4.89
Add New Post /wp-admin/post-new.php1,530 ▲223.50 ▲0.57623.10 ▼51.1160.44 ▲1.15
Media Library /wp-admin/upload.php1,404 ▲14.18 ▼0.0393.54 ▼6.0639.71 ▼4.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/login-and-logout-redirect/admin/partials/login-and-logout-redirect-admin-display.php
    • > /wp-content/plugins/login-and-logout-redirect/public/partials/login-and-logout-redirect-public-display.php
  • 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-and-logout-redirect/includes/class-logout-redirect.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/login-and-logout-redirect/includes/class-login-redirect.php:30

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

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

The entry point to "Login and Logout Redirect" version 2.0.3 is a PHP file that has certain tags in its header comment area
102 characters long description:
A WordPress plugin which enables you to redirect users on login and logout or both, in a simplest way.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin623 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP14162621421
Markdown21030139
XML10150
Dockerfile1207
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.89
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods44
▷ Static methods24.55%
▷ Public methods3681.82%
▷ Protected methods00.00%
▷ Private methods818.18%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 images were found in this plugin