90% direct-logout

Code Review | Direct Logout

WordPress plugin Direct Logout scored90%from 54 tests.

About plugin

  • Plugin page: direct-logout
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Feb 22, 2021
  • Latest release: Feb 22, 2021
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: finalmarco (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /960 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
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.56ms] Passed 4 tests

Analyzing server-side resources used by Direct Logout
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.16 ▲0.05
Dashboard /wp-admin3.44 ▲0.1446.21 ▼7.68
Posts /wp-admin/edit.php3.56 ▲0.2050.51 ▼0.57
Add New Post /wp-admin/post-new.php6.02 ▲0.1486.83 ▼14.05
Media Library /wp-admin/upload.php3.37 ▲0.1437.84 ▲1.77

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Direct Logout
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.34 ▼0.251.74 ▲0.0041.63 ▼2.11
Dashboard /wp-admin2,214 ▲375.59 ▲0.0286.65 ▼16.0340.87 ▼3.64
Posts /wp-admin/edit.php2,116 ▲161.95 ▼0.0839.83 ▲0.3237.28 ▼4.40
Add New Post /wp-admin/post-new.php1,539 ▲1323.49 ▲0.28665.65 ▼22.4054.26 ▼5.34
Media Library /wp-admin/upload.php1,416 ▲164.18 ▼0.0198.46 ▼18.0743.73 ▼5.36

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
2 plugin tags: logout, woocommerce

direct-logout/finalmarco-direct-logout.php 92% from 13 tests

This is the main PHP file of "Direct Logout" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("direct-logout.php" instead of "finalmarco-direct-logout.php")

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
No dangerous file extensions were detected737 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4163215737

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.72
Average class complexity80.00
▷ Minimum class complexity10.00
▷ Maximum class complexity150.00
Average method complexity7.87
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1252.17%
▷ Protected methods1043.48%
▷ Private methods14.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin