83% wp-login-and-logout-redirect

Code Review | WP Login and Logout Redirect

WordPress plugin WP Login and Logout Redirect scored83%from 54 tests.

About plugin

  • Plugin page: wp-login-and-logo...
  • Plugin version: 1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-6.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2020
  • Latest release: Jun 3, 2023
  • Number of updates: 24
  • Update frequency: every 41.2 days
  • Top authors: aminurislam01 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

5,000+ active /20,860 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
This plugin's installer ran successfully

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

A check of server-side resources used by WP Login and Logout Redirect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.85 ▲0.16
Dashboard /wp-admin3.32 ▼0.0247.04 ▼11.61
Posts /wp-admin/edit.php3.38 ▲0.0242.38 ▼4.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0278.92 ▼15.81
Media Library /wp-admin/upload.php3.25 ▲0.0235.70 ▲3.34

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Login and Logout Redirect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.34 ▼0.011.72 ▲0.0744.42 ▲7.59
Dashboard /wp-admin2,211 ▲315.83 ▲0.1593.81 ▲4.4741.14 ▲1.30
Posts /wp-admin/edit.php2,113 ▲162.03 ▲0.0434.40 ▼2.0134.52 ▼2.60
Add New Post /wp-admin/post-new.php1,541 ▲1523.02 ▲0.03646.22 ▼32.8262.75 ▲1.51
Media Library /wp-admin/upload.php1,416 ▲164.21 ▲0.0294.51 ▼13.2841.22 ▼5.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-login-and-logout-redirect/includes/login-user-time/login-user-time.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

wp-login-and-logout-redirect/wp-login-logout-redirect.php 85% from 13 tests

"WP Login and Logout Redirect" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-login-and-logout-redirect.php" instead of "wp-login-logout-redirect.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 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin122 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36655122

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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