84% admin-bar-login

Code Review | Admin Bar Login

WordPress plugin Admin Bar Login scored84%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: 6.3.1
  • 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 /18,302 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by Admin Bar Login
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.73 ▼4.35
Dashboard /wp-admin3.31 ▼0.0343.54 ▼17.72
Posts /wp-admin/edit.php3.36 ▲0.0144.75 ▲1.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.24 ▼9.87
Media Library /wp-admin/upload.php3.23 ▲0.0136.69 ▲4.05

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Admin Bar Login
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.70 ▼0.684.24 ▲2.5440.38 ▼3.91
Dashboard /wp-admin2,206 ▲184.83 ▼0.09100.66 ▼16.4240.75 ▼3.89
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0036.09 ▼2.6231.99 ▼0.75
Add New Post /wp-admin/post-new.php1,542 ▲2018.30 ▼5.12607.00 ▼47.5652.03 ▼5.81
Media Library /wp-admin/upload.php1,385 ▼64.20 ▼0.09102.23 ▲3.3945.07 ▲0.44

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: login, admin bar

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

The main PHP script in "Admin Bar Login" version 1.0.2 is automatically included on every request by WordPress
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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS15058
PHP110932

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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
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

PNG files should be compressed to save space and 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%