84% log-out-shortcode

Code Review | Log Out Shortcode

WordPress plugin Log Out Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: log-out-shortcode
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.5
  • WordPress version: 6.3.1
  • First release: Aug 3, 2014
  • Latest release: Sep 4, 2020
  • Number of updates: 23
  • Update frequency: every 96.9 days
  • Top authors: jamescollins (91.3%)om4 (13.04%)

Code review

54 tests

User reviews

11 reviews

Install metrics

4,000+ active /42,760 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
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.75ms] Passed 4 tests

This is a short check of server-side resources used by Log Out Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.72 ▲1.77
Dashboard /wp-admin3.31 ▼0.0352.31 ▼7.36
Posts /wp-admin/edit.php3.36 ▲0.0145.56 ▼1.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.24 ▼19.99
Media Library /wp-admin/upload.php3.23 ▲0.0134.60 ▲1.62

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Log Out Shortcode: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.141.69 ▲0.0144.18 ▲4.91
Dashboard /wp-admin2,206 ▲185.91 ▲0.8299.02 ▼4.3738.04 ▼5.60
Posts /wp-admin/edit.php2,092 ▼02.01 ▼0.0334.83 ▼5.6632.36 ▼2.38
Add New Post /wp-admin/post-new.php1,534 ▲2023.29 ▲5.71659.53 ▲30.6549.30 ▼14.93
Media Library /wp-admin/upload.php1,391 ▼04.27 ▲0.0695.76 ▼4.0940.56 ▼2.57

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/log-out-shortcode/log-out-shortcode.php:75

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: link, log out, log-out, logout, shortcode

log-out-shortcode/log-out-shortcode.php Passed 13 tests

This is the main PHP file of "Log Out Shortcode" version 1.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
78 characters long description:
Easily add a log out link to a post or page using a simple [logout] shortcode.

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
Success! There were no dangerous files found in this plugin32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1123332

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
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 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin