84% logout-roulette

Code Review | Logout Roulette

WordPress plugin Logout Roulette scored 84% from 54 tests.

About plugin

  • Plugin page: logout-roulette
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8
  • WordPress version: 6.3.1
  • First release: Dec 10, 2013
  • Latest release: Jan 21, 2014
  • Number of updates: 9
  • Update frequency: every 4.7 days
  • Top authors: bradparbs (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

10+ active / 1,582 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.54ms] Passed 4 tests

Analyzing server-side resources used by Logout Roulette
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0036.62 ▼9.37
Dashboard /wp-admin3.31 ▲0.0143.46 ▼10.30
Posts /wp-admin/edit.php3.36 ▲0.0049.97 ▲1.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.32 ▼6.16
Media Library /wp-admin/upload.php3.23 ▲0.0030.68 ▼4.34

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, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Logout Roulette
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.37 ▼1.061.67 ▼0.1638.64 ▼2.26
Dashboard /wp-admin2,206 ▲184.85 ▼1.05111.82 ▲10.1242.92 ▼1.74
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0240.22 ▲1.3035.45 ▲1.03
Add New Post /wp-admin/post-new.php1,514 ▼017.62 ▲0.15681.30 ▲4.0753.81 ▼2.20
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.0099.59 ▼0.8842.88 ▼3.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logout-roulette/logout-roulette.php:28

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: logout, admin, fun, prank

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

The principal PHP file in "Logout Roulette" v. 1.1.1 is loaded by WordPress automatically on each request
72 characters long description:
On every admin page load, there's a 1 in 10 chance you'll be logged out.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected22 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP162222

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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