84% logout-clear-cookies

Code Review | Logout Clear Cookies

WordPress plugin Logout Clear Cookies scored84%from 54 tests.

About plugin

  • Plugin page: logout-clear-cookies
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.5
  • WordPress version: 6.3.1
  • First release: Mar 7, 2017
  • Latest release: Aug 2, 2020
  • Number of updates: 16
  • Update frequency: every 77.3 days
  • Top authors: joelhardi (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /7,262 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.01MB] [CPU: ▼1.85ms] Passed 4 tests

Analyzing server-side resources used by Logout Clear Cookies
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.73 ▼0.13
Dashboard /wp-admin3.31 ▲0.0145.67 ▼3.30
Posts /wp-admin/edit.php3.36 ▲0.0148.89 ▼1.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.42 ▼2.20
Media Library /wp-admin/upload.php3.23 ▲0.0036.28 ▲3.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Logout Clear Cookies
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.32 ▼1.331.82 ▲0.1042.40 ▲2.94
Dashboard /wp-admin2,209 ▲185.88 ▲0.9695.95 ▼7.0440.82 ▼5.04
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0639.05 ▲1.3935.56 ▼1.36
Add New Post /wp-admin/post-new.php1,514 ▼617.68 ▼5.37653.01 ▼22.1758.56 ▲5.48
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.05107.32 ▲2.2948.96 ▲2.44

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/logout-clear-cookies/logout-clear-cookies.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: admin, security, privacy, cookie

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

The main PHP script in "Logout Clear Cookies" version 0.2 is automatically included on every request by WordPress
72 characters long description:
Clears all cookies on logout. Because leaving a trail of cookies is bad.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15248

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected