93% wpi-custom-logout

Code Review | WPi Custom Logout - Redirect to home page on Logout

WordPress plugin WPi Custom Logout - Redirect to home page on Logout scored 93% from 54 tests.

About plugin

  • Plugin page: wpi-custom-logout
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 5.9.2
  • First release: Jan 12, 2015
  • Latest release: Jan 15, 2015
  • Number of updates: 35
  • Update frequency: every 0.1 days
  • Top authors: wooprali (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

200+ active / 4,824 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

An overview of server-side resources used by WPi Custom Logout - Redirect to home page on Logout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.4058.01 ▲39.17
Dashboard /wp-admin3.41 ▲0.0133.23 ▼2.89
Posts /wp-admin/edit.php3.64 ▲0.0139.42 ▼0.86
Add New Post /wp-admin/post-new.php6.88 ▼0.0994.55 ▼1,230.13
Media Library /wp-admin/upload.php3.30 ▲0.0031.41 ▲5.33

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WPi Custom Logout - Redirect to home page on Logout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲1715.23 ▼0.445.67 ▼0.642.80 ▲0.46
Dashboard /wp-admin2,892 ▲386.12 ▼0.06123.84 ▼98.54172.85 ▲4.79
Posts /wp-admin/edit.php2,672 ▼193.25 ▲0.0169.06 ▲3.33214.37 ▲10.76
Add New Post /wp-admin/post-new.php1,660 ▼3021.34 ▲0.81439.53 ▼40.14188.27 ▼37.62
Media Library /wp-admin/upload.php1,698 ▲35.53 ▲0.04184.81 ▲37.27209.18 ▼64.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wpi-custom-logout/wpi-custom-logout.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wpi-custom-logout/wpi-custom-logout.php 85% from 13 tests

"WPi Custom Logout - Redirect to home page on Logout" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/locale/")

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
There were no executable files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP101411

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin