84% clear-logout

Code Review | Clear Logout

WordPress plugin Clear Logout scored84%from 54 tests.

About plugin

  • Plugin page: clear-logout
  • Plugin version: 1.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Jan 25, 2020
  • Latest release: Jul 23, 2023
  • Number of updates: 10
  • Update frequency: every 127.6 days
  • Top authors: ayeshrajans (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,307 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.20ms] Passed 4 tests

A check of server-side resources used by Clear Logout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.88 ▼4.46
Dashboard /wp-admin3.31 ▲0.0144.80 ▼7.69
Posts /wp-admin/edit.php3.36 ▲0.0145.60 ▲0.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.19 ▼6.56
Media Library /wp-admin/upload.php3.23 ▲0.0133.42 ▼2.09

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Clear Logout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.56 ▼0.991.67 ▼0.1544.27 ▼0.93
Dashboard /wp-admin2,209 ▲205.91 ▼0.0296.57 ▼10.8338.27 ▼6.70
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0235.36 ▲2.0435.87 ▼0.01
Add New Post /wp-admin/post-new.php1,538 ▲422.95 ▼0.00654.08 ▲18.2955.79 ▼8.37
Media Library /wp-admin/upload.php1,388 ▼04.29 ▲0.0599.98 ▲5.7641.84 ▲1.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please 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/clear-logout/clear-logout.php:23

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)
There were no browser issues 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, security, authentication, password

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

"Clear Logout" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
114 characters long description:
A tiny WordPress plugin to clear all browser data related to the site upon logout (With `Clear-Site-Data` header).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected38 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
JSON10031
PHP12207

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
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%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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