84% wp-force-logout

Code Review | WPForce Logout

WordPress plugin WPForce Logout scored84%from 54 tests.

About plugin

  • Plugin page: wp-force-logout
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 14, 2018
  • Latest release: Apr 24, 2023
  • Number of updates: 28
  • Update frequency: every 59.0 days
  • Top authors: sanzeeb3 (100%)

Code review

54 tests

User reviews

62 reviews

Install metrics

8,000+ active /51,651 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼7.04ms] Passed 4 tests

A check of server-side resources used by WPForce Logout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0943.48 ▲5.53
Dashboard /wp-admin3.37 ▲0.0750.22 ▼0.39
Posts /wp-admin/edit.php3.49 ▲0.1348.15 ▼8.29
Add New Post /wp-admin/post-new.php5.95 ▲0.0783.35 ▼23.16
Media Library /wp-admin/upload.php3.29 ▲0.0737.38 ▲3.68

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

WPForce Logout: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.101.81 ▲0.0443.89 ▲4.17
Dashboard /wp-admin2,206 ▲215.91 ▼0.0699.95 ▼12.3237.99 ▼7.67
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0235.02 ▼1.9832.43 ▲2.17
Add New Post /wp-admin/post-new.php1,533 ▲1923.25 ▲5.53683.94 ▲36.7357.93 ▼3.46
Media Library /wp-admin/upload.php1,388 ▲64.14 ▼0.0493.49 ▼5.6343.17 ▲1.37

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 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/wp-force-logout/src/WPForce_Logout_CLI.php:72

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: last login, logout, online, force, last seen

wp-force-logout/wp-force-logout.php Passed 13 tests

Analyzing the main PHP file in "WPForce Logout" version 1.5.0
36 characters long description:
Forcefully logout WordPress user(s).

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 detected436 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5130278328
CSS215062
XML141233
JavaScript14413

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity16.67
▷ Minimum class complexity4.00
▷ Maximum class complexity37.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods29
▷ Static methods13.45%
▷ Public methods2689.66%
▷ Protected methods00.00%
▷ Private methods310.34%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
There are no PNG files in this plugin