90% idle-user-logout

Code Review | Idle User Logout

WordPress plugin Idle User Logout scored90%from 54 tests.

About plugin

  • Plugin page: idle-user-logout
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8.2
  • WordPress version: 6.3.1
  • First release: May 22, 2015
  • Latest release: Nov 28, 2021
  • Number of updates: 44
  • Update frequency: every 54.4 days
  • Top authors: abiralneupane (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active /24,193 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼5.59ms] Passed 4 tests

An overview of server-side resources used by Idle User Logout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.31 ▼2.27
Dashboard /wp-admin3.43 ▲0.1344.37 ▼4.69
Posts /wp-admin/edit.php3.54 ▲0.1850.31 ▲4.28
Add New Post /wp-admin/post-new.php6.03 ▲0.1481.43 ▼17.28
Media Library /wp-admin/upload.php3.35 ▲0.1234.17 ▲1.89
Idle User Logout /wp-admin/options-general.php?page=iul-settings3.3233.28

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
iul_behavior
iul_data
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Idle User Logout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,989 ▲22814.27 ▼0.0810.28 ▲8.6839.99 ▲1.52
Dashboard /wp-admin2,252 ▲776.00 ▲0.1787.48 ▼10.4539.46 ▼0.95
Posts /wp-admin/edit.php2,115 ▲152.29 ▲0.2838.89 ▲4.9031.95 ▼5.47
Add New Post /wp-admin/post-new.php1,540 ▲1423.47 ▲0.37624.74 ▼45.1654.34 ▼0.14
Media Library /wp-admin/upload.php1,412 ▲94.51 ▲0.25106.71 ▲7.9046.72 ▲3.01
Idle User Logout /wp-admin/options-general.php?page=iul-settings8502.2733.7131.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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
9 plugin tags: idle time, auto logout, idle user, signout, automatic...

idle-user-logout/idle-user-logout.php Passed 13 tests

The entry point to "Idle User Logout" version 3.0 is a PHP file that has certain tags in its header comment area
122 characters long description:
This plugin automatically logs out the user after a period of idle time. The time period can be configured from admin end.

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
Good job! No executable or dangerous file extensions detected786 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP611517560
CSS1163135
JavaScript416491

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity20.50
▷ Minimum class complexity9.00
▷ Maximum class complexity41.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants1
▷ Global constants1100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon.png1.67KB0.66KB▼ 60.30%