84% login-logout-menu

Code Review | Login Logout Menu

WordPress plugin Login Logout Menu scored84%from 54 tests.

About plugin

  • Plugin page: login-logout-menu
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jan 5, 2018
  • Latest release: Mar 24, 2023
  • Number of updates: 18
  • Update frequency: every 105.8 days
  • Top authors: hiddenpearls (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

20,000+ active /194,264 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.76ms] Passed 4 tests

Server-side resources used by Login Logout Menu
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0944.08 ▲0.94
Dashboard /wp-admin3.39 ▲0.0948.32 ▼5.22
Posts /wp-admin/edit.php3.50 ▲0.1547.41 ▼0.61
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.82 ▼2.16
Media Library /wp-admin/upload.php3.31 ▲0.0852.77 ▲17.47

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Login Logout Menu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.431.68 ▼0.1444.29 ▲0.54
Dashboard /wp-admin2,198 ▲185.59 ▼0.0686.39 ▼7.8039.90 ▼5.17
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0539.30 ▲2.9836.68 ▲3.20
Add New Post /wp-admin/post-new.php1,531 ▲322.69 ▼0.36662.52 ▲11.3458.49 ▲5.40
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.07102.68 ▼5.5843.32 ▼4.90

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
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_basename() in wp-content/plugins/login-logout-menu/login-logout-menu.php:57

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

login-logout-menu/login-logout-menu.php Passed 13 tests

"Login Logout Menu" version 1.4.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
129 characters long description:
Login Logout Menu is a handy plugin which allows you to add login, logout, register and profile menu items in your selected menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin327 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2106250327

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.50
▷ Minimum class complexity9.00
▷ Maximum class complexity40.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods1986.36%
▷ Protected methods00.00%
▷ Private methods313.64%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.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