79% logout-redirect

Code Review | Logout Redirect

WordPress plugin Logout Redirect scored79%from 54 tests.

About plugin

  • Plugin page: logout-redirect
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Feb 24, 2014
  • Latest release: Mar 5, 2014
  • Number of updates: 7
  • Update frequency: every 1.3 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

300+ active /5,136 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.17MB] [CPU: ▼19.13ms] Passed 4 tests

This is a short check of server-side resources used by Logout Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0630.02 ▼14.50
Dashboard /wp-admin3.19 ▼0.1135.08 ▼18.48
Posts /wp-admin/edit.php3.27 ▼0.0936.59 ▼15.80
Add New Post /wp-admin/post-new.php5.46 ▼0.4376.25 ▼27.74
Media Library /wp-admin/upload.php3.20 ▼0.0332.18 ▼4.42
Logout Redirect /wp-admin/options-general.php?page=logout-redirect-options3.1631.56

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
logout_redirect_type
can_compress_scripts
logout_redirect_customise_url
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Logout Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.31 ▼1.201.82 ▼0.2944.35 ▼1.21
Dashboard /wp-admin2,210 ▲314.88 ▼1.02105.15 ▼8.0046.10 ▲3.44
Posts /wp-admin/edit.php2,096 ▲102.00 ▼0.0134.06 ▼1.8933.64 ▼1.16
Add New Post /wp-admin/post-new.php1,522 ▼1123.27 ▲0.24674.41 ▼9.5458.04 ▲6.46
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0495.08 ▼9.3246.84 ▲3.37
Logout Redirect /wp-admin/options-general.php?page=logout-redirect-options8172.0624.3528.65

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
  • The uninstall procedure has failed, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • logout_redirect_type
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • logout_redirect_customise_url

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=logout-redirect-options
    • > Notice in wp-content/plugins/logout-redirect/logout-redirect.php+55
    Undefined index: HTTPS

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/logout-redirect/logout-redirect.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logout-redirect/options.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
2 plugin tags: post, redirect

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

The main PHP file in "Logout Redirect" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
63 characters long description:
Redirect to a link after logout. 登出後跳轉至特定鏈接

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected157 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2172595
PO File2274062

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were 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
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ 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
There were not PNG files found in your plugin