89% toolbar-login-button

Code Review | Toolbar Login Button

WordPress plugin Toolbar Login Button scored89%from 54 tests.

About plugin

  • Plugin page: toolbar-login-button
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 6.3.1
  • First release: May 1, 2018
  • Latest release: Nov 2, 2020
  • Number of updates: 21
  • Update frequency: every 44.2 days
  • Top authors: vkucukcakar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,173 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

This is a short check of server-side resources used by Toolbar Login Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1043.43 ▼0.12
Dashboard /wp-admin3.42 ▲0.1149.89 ▼0.33
Posts /wp-admin/edit.php3.53 ▲0.1748.16 ▲0.29
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.62 ▲2.57
Media Library /wp-admin/upload.php3.34 ▲0.1135.49 ▲0.15
Toolbar Login Button /wp-admin/options-general.php?page=toolbar_login_button_options3.3134.33

Server storage [IO: ▲0.06MB] [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: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Toolbar Login Button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.28 ▼1.114.51 ▲2.5041.90 ▼3.98
Dashboard /wp-admin2,207 ▲225.80 ▼0.0896.64 ▼16.7335.36 ▼12.97
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0635.55 ▼1.6531.84 ▼2.93
Add New Post /wp-admin/post-new.php1,536 ▲1723.30 ▲0.35629.00 ▼50.2950.70 ▼4.25
Media Library /wp-admin/upload.php1,392 ▲14.30 ▲0.1395.56 ▼4.3940.94 ▼3.48
Toolbar Login Button /wp-admin/options-general.php?page=toolbar_login_button_options1,0902.0424.2428.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt might help

toolbar-login-button/plugin.php 77% from 13 tests

The main PHP file in "Toolbar Login Button" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Description: Please don't use more than 140 characters for the plugin description (currently 174 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("toolbar-login-button.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected390 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP336158366
CSS16824

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity13.50
▷ Minimum class complexity12.00
▷ Maximum class complexity15.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes2100.00%
Methods19
▷ Static methods19100.00%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin