89% tavakal-destroy-user-sessions

Code Review | Tavakal - Destroy user sessions

WordPress plugin Tavakal - Destroy user sessions scored 89% from 54 tests.

About plugin

  • Plugin page: tavakal-destroy-u...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Feb 10, 2022
  • Latest release: Feb 10, 2022
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: tavakal4devs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.53ms] Passed 4 tests

An overview of server-side resources used by Tavakal - Destroy user sessions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0640.49 ▼0.57
Dashboard /wp-admin3.36 ▲0.0546.42 ▼3.60
Posts /wp-admin/edit.php3.47 ▲0.1143.07 ▼2.52
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.86 ▲0.59
Media Library /wp-admin/upload.php3.28 ▲0.0533.77 ▲2.96

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Tavakal - Destroy user sessions: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.24 ▼1.145.28 ▲3.4645.23 ▼7.12
Dashboard /wp-admin2,203 ▲154.85 ▼1.01111.97 ▲6.9945.80 ▲1.92
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0036.89 ▼2.2833.66 ▲2.50
Add New Post /wp-admin/post-new.php1,514 ▼2017.64 ▼5.64678.51 ▼27.3754.10 ▲1.71
Media Library /wp-admin/upload.php1,385 ▼34.20 ▼0.0797.66 ▼2.7940.56 ▼3.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: inactive users, logout afk, kick inactive users, kick user

tavakal-destroy-user-sessions/index.php 85% from 13 tests

The main PHP script in "Tavakal - Destroy user sessions" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("tavakal-destroy-user-sessions.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 171 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected191 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34577191

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.50
▷ Minimum class complexity8.00
▷ Maximum class complexity11.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin