94% admin-bar-tools

Code Review | Admin Bar Tools

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

About plugin

  • Plugin page: admin-bar-tools
  • Plugin version: 1.5.2
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.1-5.9.2
  • WordPress version: 5.9.2
  • First release: Nov 5, 2020
  • Latest release: Mar 18, 2022
  • Number of updates: 27
  • Update frequency: every 19.0 days
  • Top authors: braveryk7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 906 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by Admin Bar Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1857.05 ▲5.15
Dashboard /wp-admin3.53 ▲0.1233.40 ▼1.01
Posts /wp-admin/edit.php3.75 ▲0.1135.68 ▼0.40
Add New Post /wp-admin/post-new.php7.01 ▲0.0397.68 ▼1,183.37
Media Library /wp-admin/upload.php3.41 ▲0.1026.06 ▼5.31
Admin Bar Tools /wp-admin/options-general.php?page=admin-bar-tools3.4023.34

Server storage [IO: ▲0.42MB] [DB: ▲0.00MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
It is recommended to fix the following issues
  • Illegal file modification detected: 2 files (0.00KB) outside of "wp-content/plugins/admin-bar-tools/" and "wp-content/uploads/"
    • (new file) "wp-content/plugins/admin-bar-tools/img/icon-128\303\227128.jpg"
    • (new file) "wp-content/plugins/admin-bar-tools/img/icon-256\303\227256.jpg"
Filesystem: 42 new files
Database: no new tables, 1 new option
New WordPress options
abt_options

Browser metrics Passed 4 tests

Admin Bar Tools: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,886 ▲16415.89 ▲0.236.80 ▲1.192.48 ▲0.31
Dashboard /wp-admin2,942 ▲846.11 ▼0.01118.74 ▼10.76154.78 ▼1.15
Posts /wp-admin/edit.php2,741 ▲503.25 ▲0.0164.07 ▲1.73140.07 ▼3.89
Add New Post /wp-admin/post-new.php1,702 ▲4116.93 ▲0.97405.22 ▼22.09161.51 ▲1.49
Media Library /wp-admin/upload.php1,751 ▲535.50 ▼0.01142.44 ▲8.53192.75 ▼0.30
Admin Bar Tools /wp-admin/options-general.php?page=admin-bar-tools1,4447.66166.10145.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following
  • 10× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-add-admin-bar.php
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-return-data.php
    • > /wp-content/plugins/admin-bar-tools/modules/cancel-activate.php
    • > /wp-content/plugins/admin-bar-tools/admin-bar-tools.php
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-connect-database.php
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-base.php
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-activate.php
    • > /wp-content/plugins/admin-bar-tools/lib/abt-strings.php
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-admin-page.php
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-admin-settings-page.php

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 Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: toolbar, development, admin menu, admin bar

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

"Admin Bar Tools" version 1.5.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
62 characters long description:
A plugin that allows you to add useful links to the admin bar.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,285 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP121303551,117
PO File395159164
JSON2002
CSS1001
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.25
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods613.95%
▷ Public methods3172.09%
▷ Protected methods818.60%
▷ Private methods49.30%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants00.00%
▷ Class constants14100.00%
▷ Public constants428.57%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 compressed PNG files occupy 0.31MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/original/logo.png8.51KB9.65KB0.00%
img/original/instagram_profile_image.png6.51KB7.53KB0.00%
img/original/linkedin_banner_image_1.png8.84KB8.86KB0.00%
img/original/facebook_cover_photo_1.png8.26KB8.26KB0.00%
img/original/pinterest_board_photo.png4.98KB5.83KB0.00%