84% loginout

Code Review | LogInOut button

WordPress plugin LogInOut button scored 84% from 54 tests.

About plugin

  • Plugin page: loginout
  • Plugin version: 0.305
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.3
  • WordPress version: 5.8.1
  • First release: Sep 3, 2017
  • Latest release: Oct 23, 2019
  • Number of updates: 18
  • Update frequency: every 43.3 days
  • Top authors: n4me (55.56%)net4me (50%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 766 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: ▼1.86MB] [CPU: ▼191.05ms] Passed 4 tests

An overview of server-side resources used by LogInOut button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼0.955.03 ▼17.80
Dashboard /wp-admin1.79 ▼1.2710.17 ▼34.93
Posts /wp-admin/edit.php1.79 ▼1.324.61 ▼38.15
Add New Post /wp-admin/post-new.php1.79 ▼3.645.82 ▼656.08
Media Library /wp-admin/upload.php1.79 ▼1.225.45 ▼35.03

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

LogInOut button: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,685 ▲8916.34 ▲0.667.17 ▼3.8945.91 ▲1.56
Dashboard /wp-admin2,972 ▲385.92 ▼0.01132.91 ▼17.84112.50 ▼0.08
Posts /wp-admin/edit.php2,741 ▲22.72 ▲0.0162.87 ▼0.2485.18 ▼8.85
Add New Post /wp-admin/post-new.php1,502 ▼37418.51 ▼0.78366.20 ▼24.40116.97 ▼1.88
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.01145.75 ▼3.25120.94 ▼1.37

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
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5663
    wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the loginout handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/loginout/loginout.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
7 plugin tags: button, username, loginout, logout, login...

loginout/loginout.php 92% from 13 tests

This is the main PHP file of "LogInOut button" version 0.305, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 298 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected63 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS18436
PHP172727

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin