10% logout-to-homepage

Code Review | Logout to Homepage

WordPress plugin Logout to Homepage scored10%from 54 tests.

About plugin

  • Plugin page: logout-to-homepage
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 5, 2017
  • Latest release: Sep 17, 2019
  • Number of updates: 5
  • Update frequency: every 173.2 days
  • Top authors: jasonh1234 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,208 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/logout-to-homepage/logout-to-home.php+10
    Function create_function() is deprecated

Server metrics [RAM: ▼1.95MB] [CPU: ▼58.85ms] Passed 4 tests

This is a short check of server-side resources used by Logout to Homepage
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.81 ▼42.26
Dashboard /wp-admin2.06 ▼1.246.03 ▼50.32
Posts /wp-admin/edit.php2.06 ▼1.304.93 ▼46.11
Add New Post /wp-admin/post-new.php2.06 ▼3.836.29 ▼96.70
Media Library /wp-admin/upload.php2.06 ▼1.174.82 ▼31.41

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Logout to Homepage: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.45 ▲0.021.87 ▼0.3242.72 ▼2.44
Dashboard /wp-admin2,209 ▲215.88 ▲0.97101.13 ▼16.2543.11 ▼0.08
Posts /wp-admin/edit.php2,092 ▲62.01 ▲0.0234.72 ▼2.1434.91 ▲0.40
Add New Post /wp-admin/post-new.php1,533 ▲1923.39 ▲5.85642.61 ▼20.3373.99 ▲3.91
Media Library /wp-admin/upload.php1,385 ▼64.22 ▲0.0597.99 ▼6.7142.68 ▲1.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/logout-to-homepage/logout-to-home.php+10
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logout-to-homepage/logout-to-home.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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 to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === logout-to-homepage === )
Please take inspiration from this readme.txt

logout-to-homepage/logout-to-home.php 92% from 13 tests

The main PHP file in "Logout to Homepage" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("logout-to-homepage.php" instead of "logout-to-home.php")

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 plugin3 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1273

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin