74% sf-adminbar-tools

Code Review | Admin Bar Tools

WordPress plugin Admin Bar Tools scored74%from 54 tests.

About plugin

  • Plugin page: sf-adminbar-tools
  • Plugin version: 4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6.0
  • WordPress version: 6.3.1
  • First release: Jun 16, 2012
  • Latest release: Jan 18, 2021
  • Number of updates: 29
  • Update frequency: every 108.4 days
  • Top authors: GregLone (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active /11,944 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.38MB] [CPU: ▲1.28ms] Passed 4 tests

This is a short check of server-side resources used by Admin Bar Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.78 ▲1.3263.22 ▲23.35
Dashboard /wp-admin4.73 ▲1.4366.05 ▲11.55
Posts /wp-admin/edit.php4.76 ▲1.4164.42 ▲9.72
Add New Post /wp-admin/post-new.php7.38 ▲1.4986.55 ▼27.41
Media Library /wp-admin/upload.php4.61 ▲1.3851.60 ▲11.26
All Settings /wp-admin/options.php7.5648.89

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 576 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Admin Bar Tools: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,616 ▲85513.56 ▼0.999.49 ▲7.8646.59 ▲4.08
Dashboard /wp-admin2,811 ▲6315.72 ▲0.0597.49 ▲8.0339.54 ▼2.78
Posts /wp-admin/edit.php2,713 ▲6132.04 ▲0.0737.25 ▼0.8933.90 ▼0.03
Add New Post /wp-admin/post-new.php2,209 ▲68323.52 ▲0.45672.77 ▼28.9865.17 ▲6.33
Media Library /wp-admin/upload.php2,019 ▲6164.24 ▲0.0999.58 ▼3.6341.73 ▼0.98
All Settings /wp-admin/options.php3,7401.6933.3438.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 327× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Screenfeed\\AdminbarTools\\Dependencies\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sf-adminbar-tools/src/classes/Dependencies/Composer/Installers/MayaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Screenfeed\\AdminbarTools\\Dependencies\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sf-adminbar-tools/src/classes/Dependencies/Composer/Installers/OxidInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Screenfeed\\AdminbarTools\\Dependencies\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sf-adminbar-tools/src/classes/Dependencies/Composer/Installers/KnownInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Screenfeed\\AdminbarTools\\Dependencies\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sf-adminbar-tools/src/classes/Dependencies/Composer/Installers/PrestashopInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Container\\Argument\\ArgumentResolverInterface' not found in wp-content/plugins/sf-adminbar-tools/vendor/league/container/src/Definition/AbstractDefinition.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Screenfeed\\AdminbarTools\\Dependencies\\Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sf-adminbar-tools/src/classes/Dependencies/Composer/Installers/WHMCSInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'ScreenfeedAdminbarTools_Mustache_Loader' not found in wp-content/plugins/sf-adminbar-tools/src/classmap/dependencies/mustache/mustache/src/Mustache/Loader/CascadingLoader.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'ScreenfeedAdminbarTools_Mustache_Loader' not found in wp-content/plugins/sf-adminbar-tools/src/classmap/dependencies/mustache/mustache/src/Mustache/Loader/ArrayLoader.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/sf-adminbar-tools/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/sf-adminbar-tools/vendor/mustache/mustache/src/Mustache/Loader/ArrayLoader.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: testing, query, tests, development, debug

sf-adminbar-tools/sf-adminbar-tools.php 92% from 13 tests

The main PHP file in "Admin Bar Tools" ver. 4.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
It is important to fix the following items
  • Do not distribute dangerous files with your plugin
    • .ms - Maxwell Script in Maxwell Render
      • wp-content/plugins/sf-adminbar-tools/vendor/mustache/mustache/test/fixtures/templates/alpha.ms
      • wp-content/plugins/sf-adminbar-tools/vendor/mustache/mustache/test/fixtures/templates/beta.ms
18,086 lines of code in 531 files:
LanguageFilesBlank linesComment linesLines of code
PHP4673,89210,17916,509
Markdown82330566
JSON100402
Mustache4810232
CSS205217
JavaScript21853107
YAML26038
XML12015

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity3.69
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces39
Interfaces59
Traits8
Classes405
▷ Abstract classes194.69%
▷ Concrete classes38695.31%
▷ Final classes10.26%
Methods1,195
▷ Static methods282.34%
▷ Public methods97281.34%
▷ Protected methods1149.54%
▷ Private methods1099.12%
Functions71
▷ Named functions1216.90%
▷ Anonymous functions5983.10%
Constants141
▷ Global constants10.71%
▷ Class constants14099.29%
▷ Public constants140100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/container-interop/container-interop/docs/images/priority.png15.87KB8.86KB▼ 44.20%
vendor/container-interop/container-interop/docs/images/interoperating_containers.png25.13KB12.83KB▼ 48.97%
vendor/container-interop/container-interop/docs/images/side_by_side_containers.png15.88KB8.43KB▼ 46.90%