10% login-logout-shortcode-simple

Code Review | Login Logout Shortcode Simple

WordPress plugin Login Logout Shortcode Simple scored10%from 54 tests.

About plugin

  • Plugin page: login-logout-shor...
  • Plugin version: 1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.6
  • WordPress version: 6.3.1
  • First release: Dec 4, 2019
  • Latest release: Oct 12, 2020
  • Number of updates: 61
  • Update frequency: every 5.1 days
  • Top authors: clodoaldoevangelista (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,383 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/login-logout-shortcode-simple/LoginLogoutShortcodeSimple_Plugin.php+30
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.27ms] Passed 4 tests

This is a short check of server-side resources used by Login Logout Shortcode Simple
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.55 ▲3.90
Dashboard /wp-admin3.32 ▲0.0244.25 ▼6.46
Posts /wp-admin/edit.php3.44 ▲0.0844.81 ▼1.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0278.51 ▼11.44
Media Library /wp-admin/upload.php3.25 ▲0.0233.57 ▼1.35
Login Logout Shortcode Simple /wp-admin/plugins.php?page=LoginLogoutShortcodeSimple_PluginSettings3.2229.07

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 11 new options
New WordPress options
LoginLogoutShortcodeSimple_Plugin__installed
widget_recent-comments
widget_theysaidso_widget
LoginLogoutShortcodeSimple_Plugin__version
theysaidso_admin_options
LoginLogoutShortcodeSimple_Plugin_PageRedirect
can_compress_scripts
widget_recent-posts
LoginLogoutShortcodeSimple_Plugin_CanSeeSpecialData
db_upgraded
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login Logout Shortcode Simple
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.361.87 ▲0.2147.25 ▲10.41
Dashboard /wp-admin2,199 ▲245.55 ▼0.1581.16 ▼22.0737.87 ▼6.59
Posts /wp-admin/edit.php2,104 ▲72.03 ▲0.0638.76 ▲3.3436.39 ▼2.05
Add New Post /wp-admin/post-new.php1,529 ▲323.61 ▲0.32694.54 ▲55.0064.68 ▲6.00
Media Library /wp-admin/upload.php1,398 ▼24.20 ▲0.0996.54 ▼9.2145.90 ▲0.42
Login Logout Shortcode Simple /wp-admin/plugins.php?page=LoginLogoutShortcodeSimple_PluginSettings8852.1323.4129.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 11 options in the database
    • LoginLogoutShortcodeSimple_Plugin_PageRedirect
    • widget_recent-posts
    • can_compress_scripts
    • LoginLogoutShortcodeSimple_Plugin_UsersCanRegister
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • LoginLogoutShortcodeSimple_Plugin_CanSeeSpecialData
    • LoginLogoutShortcodeSimple_Plugin__version
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/login-logout-shortcode-simple/login-logout-shortcode-simple.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

login-logout-shortcode-simple/login-logout-shortcode-simple.php Passed 13 tests

"Login Logout Shortcode Simple" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
75 characters long description:
Protect your pages by just adding a shortcode. No need to know programming.

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 detected701 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP13195580623
PO File1222269
Perl1009

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.12
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes225.00%
▷ Concrete classes675.00%
▷ Final classes00.00%
Methods73
▷ Static methods00.00%
▷ Public methods4561.64%
▷ Protected methods2838.36%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin