Black Bar

Plugin Banner

Black Bar

by Gemini Labs

Download
Description

Black Bar is an unobtrusive Debug Bar for WordPress developers. It collects and displays errors, executed SQL queries, slow actions and hooks, theme templates, global variables, and provides a profiler.

How it helps you with development:

  • Debug your code with the Console
  • Inspect global variables (COOKIE, GET, POST, SERVER, SESSION, WP_Screen)
  • Measure performance of your code with the Profiler
  • View any PHP errors that occur when loading a page in the Console
  • View executed MySQL queries along with execution time and backtrace
  • View template files of the active theme in loaded order
  • View the 50 slowest action and filter hooks along with callbacks ordered by priority

If you have never installed a WordPress plugin before, you can read instructions on how to do this here.

How do I add entries to the Console?

To add entries to the console, insert the following line of PHP anywhere in your code:

do_action('console', 'Enter something to debug here');

You can also add an optional log level like this:

do_action('console', 'Enter something to debug here', 'error');

The available log levels are: debug, info, notice, warning, error, critical, alert, and emergency.

How do I use the Profiler?

To use the profiler, insert the following lines of PHP before and after the code you are profiling:

Before:

do_action('timer:start', 'Enter a description of what you are profiling here');

After:

do_action('timer:stop');

How do I enable the plugin for non-administrators?

By default, Black Bar is only visible to administrator users. To enable it for all logged-in users, use this code snippet:

add_filter('blackbar/enabled', 'is_user_logged_in');

How do I change the number of slowest hooks displayed?

By default, Black Bar displays the 50 slowest action/filter hooks. To display all hooks, use this code snippet:

add_filter('blackbar/hooks/all', '__return_true');

Great tool

By xorinzor on April 25, 2024

Was wondering why my wordpress installation was unbearably slow. This plugin helped me discover the massive amount of SQL queries generated by 2 conflicting plugin settings. Problem solved!

i like it

By ajaxStardust on February 4, 2023

nice. thanks for updating. i prefer this extension for debugging.

Indispensable / Essential

By informatux on April 14, 2020

Il fait l'affaire haut la main, parfait 😉 It did the trick, perfect 😉

Developer must have

By Anna Bansaghi (anna.bansaghi) on July 23, 2019

Thank you for giving new life to BlackBox Debug Bar! Not only the usefulness of this plugin, but the beautiful PHP coding leads me to write this review. I have learnt a lot from your code.

Beautiful way to show the data.

By Lenin Zapata ☄ (iLenStudio) on March 28, 2019

This is a beautiful way to interpress the data, I am a developer and this plugin helped me correct errors, I really feel very inspired. Thanks for the idea.

Awesome plugin with a neat interface....Provides good information

By prateekshawebdesign on February 15, 2019

Awesome plugin with a neat interface....Provides good information like SQL and the timing and the global variables and the template files included

Helpful plugin

By khammoud on January 19, 2019

This plugin can make life easier when a quick debug is needed. I use it specially to inspect what my $_GET, $_POST, $_SESSION, $_COOKIES variables look like.

Indispensable for PHP Developers

By oliverjuwig on July 26, 2018

Really love this one.

4.1.4 (2024-05-08)

  • Added “blackbar/hooks/all” filter hook
  • Added highlighting of major WordPress hooks
  • Added support for static callables used for hook callbacks in Site Reviews
  • Change minimum PHP version to 7.4
  • Change minimum WordPress version to 6.1

4.1.3 (2024-05-08)

  • Added “blackbar/hooks/all” filter hook
  • Added highlighting of major WordPress hooks
  • Added support for static callables used for hook callbacks in Site Reviews
  • Change minimum PHP version to 7.4
  • Change minimum WordPress version to 6.1

4.1.2 (2024-05-08)

  • Added “blackbar/hooks/all” filter hook
  • Added highlighting of major WordPress hooks
  • Added support for static callables used for hook callbacks in Site Reviews
  • Change minimum PHP version to 7.4
  • Change minimum WordPress version to 6.1

4.1.1 (2024-05-08)

  • Added “blackbar/hooks/all” filter hook
  • Added highlighting of major WordPress hooks
  • Added support for static callables used for hook callbacks in Site Reviews
  • Change minimum PHP version to 7.4
  • Change minimum WordPress version to 6.1

4.1.0 (2024-05-08)

  • Added “blackbar/hooks/all” filter hook
  • Added highlighting of major WordPress hooks
  • Added support for static callables used for hook callbacks in Site Reviews
  • Change minimum PHP version to 7.4
  • Change minimum WordPress version to 6.1

4.0.3 (2023-10-11)

  • Fixed debugging of non-scalar values
  • Fixed display of console values with an Unknown log level

4.0.2 (2023-09-18)

  • Fixed PHP 7 support
  • Fixed console values which include HTML

4.0.1 (2023-03-04)

  • Added cache busting to enqueued assets
  • Added console level filter counts
  • Added HTTP_COOKIE value to INPUT_SERVER globals

4.0.0 (2023-02-13)

  • Added console level filters
  • Added sorting to Action/Filter Hooks
  • Added syntax highlighting to console entries
  • Added trace information to SQL queries
  • Beautified SQL formating
  • Changed Profiler usage (use the “timer:start” and “timer:stop” hooks)
  • Improved Profiler, it is now also more accurate
  • Refreshed UI
  • Requires PHP >= 7.3

See changelog for all versions.

Back to top