94% admin-bar-login

Code Review | Admin Bar Login

WordPress plugin Admin Bar Login scored 94% from 54 tests.

About plugin

  • Plugin page: admin-bar-login
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.2
  • WordPress version: 5.9.2
  • First release: Feb 10, 2012
  • Latest release: May 19, 2019
  • Number of updates: 17
  • Update frequency: every 156.2 days
  • Top authors: m_uysl (70.59%)scribu (35.29%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 17,890 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Admin Bar Login
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0159.43 ▼2.69
Dashboard /wp-admin3.42 ▲0.0138.85 ▼0.16
Posts /wp-admin/edit.php3.65 ▲0.0140.47 ▼2.77
Add New Post /wp-admin/post-new.php6.89 ▼0.0898.41 ▼1,208.28
Media Library /wp-admin/upload.php3.30 ▲0.0126.46 ▼0.86

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin Bar Login
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4116.19 ▲0.265.92 ▼0.342.77 ▲0.17
Dashboard /wp-admin2,895 ▲376.10 ▼0.08118.24 ▼22.03162.01 ▼1.43
Posts /wp-admin/edit.php2,694 ▲33.24 ▲0.0065.15 ▼1.47139.09 ▼1.91
Add New Post /wp-admin/post-new.php1,672 ▲1120.97 ▲4.88428.69 ▼1.62162.55 ▲20.35
Media Library /wp-admin/upload.php1,698 ▲35.43 ▼0.04144.99 ▲5.61189.64 ▲6.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/admin-bar-login/admin-bar-login.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: admin bar, login

admin-bar-login/admin-bar-login.php Passed 13 tests

The primary PHP file in "Admin Bar Login" version 1.0.2 is used by WordPress to initiate all plugin functionality
57 characters long description:
Show login form in the admin bar for non-logged-in users.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png9.02KB4.53KB▼ 49.78%