78% admin-bar-tools

Code Review | Admin Bar Tools

WordPress plugin Admin Bar Tools scored78%from 54 tests.

About plugin

  • Plugin page: admin-bar-tools
  • Plugin version: 1.6.2
  • PHP compatiblity: 8.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.1-6.2
  • WordPress version: 6.3.1
  • First release: Nov 5, 2020
  • Latest release: Mar 26, 2023
  • Number of updates: 34
  • Update frequency: every 26.0 days
  • Top authors: braveryk7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,463 total downloads

Benchmarks

Plugin footprint 82% from 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.01MB] [CPU: ▼8.43ms] 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.46 ▲0.0037.82 ▼0.94
Dashboard /wp-admin3.31 ▼0.0445.76 ▼10.10
Posts /wp-admin/edit.php3.36 ▲0.0046.99 ▼1.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.37 ▼20.74
Media Library /wp-admin/upload.php3.23 ▲0.0039.17 ▲5.13

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-256\303\227256.jpg"
    • (new file) "wp-content/plugins/admin-bar-tools/img/icon-128\303\227128.jpg"
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

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 /2,814 ▲6814.35 ▲0.001.86 ▲0.3039.82 ▼1.15
Dashboard /wp-admin2,195 ▲215.63 ▼0.0591.01 ▲3.7839.73 ▼0.88
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0040.64 ▼2.3336.01 ▼4.02
Add New Post /wp-admin/post-new.php1,526 ▼723.66 ▲0.60684.98 ▲27.8553.59 ▼1.07
Media Library /wp-admin/upload.php1,400 ▼04.14 ▼0.0894.47 ▼2.9044.07 ▲2.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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 0% 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
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-phpver-judge.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/class/class-abt-connect-database.php
    • > /wp-content/plugins/admin-bar-tools/lib/abt-strings.php
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-activate.php
    • > /wp-content/plugins/admin-bar-tools/class/class-abt-admin-settings-page.php
    • > /wp-content/plugins/admin-bar-tools/admin-bar-tools.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected '=>' (T_DOUBLE_ARROW) in wp-content/plugins/admin-bar-tools/class/class-abt-admin-page.php on line 139
    • > PHP Parse error
      syntax error, unexpected '=>' (T_DOUBLE_ARROW) in wp-content/plugins/admin-bar-tools/class/class-abt-add-admin-bar.php on line 59
    • > PHP Parse error
      syntax error, unexpected '|', expecting ';' or '{' in wp-content/plugins/admin-bar-tools/class/class-abt-base.php on line 276

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, admin menu, admin bar, development

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

"Admin Bar Tools" version 1.6.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,404 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP131473961,232
PO File399149168
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.34
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods48
▷ Static methods714.58%
▷ Public methods3675.00%
▷ Protected methods816.67%
▷ Private methods48.33%
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/favicon.png0.29KB0.29KB0.33%
img/original/twitter_header_photo_2.png3.59KB3.59KB0.03%
img/original/instagram_profile_image.png6.51KB7.53KB0.00%
img/original/facebook_cover_photo_2.png3.81KB3.81KB0.00%
img/original/youtube_profile_image.png4.98KB5.83KB0.00%