78% inactive-logout

Code Review | Inactive Logout

WordPress plugin Inactive Logout scored78%from 54 tests.

About plugin

  • Plugin page: inactive-logout
  • Plugin version: 3.2.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Jan 17, 2017
  • Latest release: Sep 20, 2023
  • Number of updates: 170
  • Update frequency: every 14.3 days
  • Top authors: j__3rk (82.35%)codemanas (18.24%)

Code review

54 tests

User reviews

104 reviews

Install metrics

10,000+ active /331,007 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
Installer ran successfully

Server metrics [RAM: ▲0.35MB] [CPU: ▲5.54ms] Passed 4 tests

An overview of server-side resources used by Inactive Logout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4047.68 ▲6.21
Dashboard /wp-admin3.68 ▲0.3851.43 ▲0.09
Posts /wp-admin/edit.php3.73 ▲0.3755.23 ▲7.29
Add New Post /wp-admin/post-new.php6.22 ▲0.33100.92 ▲8.55
Media Library /wp-admin/upload.php3.54 ▲0.3146.19 ▲10.34
Inactive Logout /wp-admin/options-general.php?page=inactive-logout3.6143.06

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 110 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
__ina_logout_message
widget_recent-posts
__ina_after_logout_message
db_upgraded
can_compress_scripts
theysaidso_admin_options
__ina_warn_message
widget_recent-comments
__ina_logout_time

Browser metrics Passed 4 tests

Checking browser requirements for Inactive Logout
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲11014.37 ▼0.016.98 ▲5.1743.62 ▲3.14
Dashboard /wp-admin2,233 ▲455.63 ▲0.80115.57 ▲7.4337.32 ▼9.26
Posts /wp-admin/edit.php2,113 ▲242.46 ▲0.4444.17 ▲6.5335.45 ▼2.08
Add New Post /wp-admin/post-new.php1,540 ▲718.69 ▼4.28594.10 ▼119.7333.29 ▼25.59
Media Library /wp-admin/upload.php1,406 ▲214.96 ▲0.7798.43 ▼3.9041.37 ▼2.56
Inactive Logout /wp-admin/options-general.php?page=inactive-logout2,2148.96181.0399.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • __ina_warn_message
    • __ina_logout_message
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • __ina_after_logout_message
    • widget_recent-posts
    • __ina_logout_time
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/inactive-logout/inactive-logout.php
    • > /wp-content/plugins/inactive-logout/legacy/class-inactive-logout-helpers.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Codemanas\\InactiveLogout\\Helpers' not found in wp-content/plugins/inactive-logout/views/tabs/tpl-inactive-logout-advanced.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Codemanas\\InactiveLogout\\Helpers' not found in wp-content/plugins/inactive-logout/views/tabs/tpl-inactive-logout-basic.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Codemanas\\InactiveLogout\\Helpers' not found in wp-content/plugins/inactive-logout/views/tabs/tpl-inactive-logout-support.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/inactive-logout/views/tpl-inactive-logout-settings.php:4
    • > PHP Warning
      Use of undefined constant INACTIVE_LOGOUT_REQUIRED_PHP - assumed 'INACTIVE_LOGOUT_REQUIRED_PHP' (this will throw an Error in a future version of PHP) in wp-content/plugins/inactive-logout/core/Bootstrap.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Codemanas\\InactiveLogout\\add_action() in wp-content/plugins/inactive-logout/core/Bootstrap.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
The official readme.txt is a good inspiration

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

This is the main PHP file of "Inactive Logout" version 3.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
109 characters long description:
Automatically logout idle user sessions, even if they are on the front end! Fully configurable & easy to use.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected13,550 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript652,5787779,756
PHP233738471,963
PO File64925821,398
CSS4560428
JSON1005

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity22.17
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods111
▷ Static methods4439.64%
▷ Public methods10493.69%
▷ Protected methods43.60%
▷ Private methods32.70%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/logo-purple-300x135.png5.38KB3.47KB▼ 35.55%