bbPress Plugin Browser »

bbPress Benchmark (0.2.5)

Download

Version: 0.2.5

Last Updated: 2010-7-31

Requires bbPress Version: 0.9 or higher

Compatible up to: 1.1

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(5)

Your Rating

Author: _ck_

Now you can find out much more detail than just "11 Queries, 0.500 seconds" at the bottom of your bbPress pages.

bb-Benchmark shows various statistics and mysql diagnostics, hidden at the bottom of the page for administrators.

Simply do a "view source" on any bbpress page to see the results at bottom (visible to administrators only).

Analysis includes current server load, page render vs mysql query time, slowest query and a list of all queries & files used.


  1. meitershaker

    5 stars
    4 stars
    3 stars
    2 stars
    1 star

    Member

    hi, how to give the possibility of all users to see the report in the source code, please?

    bye

    Posted: 3 years ago #
  2. While that is possible to do, I strongly recommend against it for security reasons as there can accidentally be information you don't want the average person to see in there.

    If you insist, you can change this line:
    if (bb_current_user_can( 'administrate' ) ) :
    to something like
    if (1 || bb_current_user_can( 'administrate' ) ) :
    which will make it always execute.

    Again, I strongly recommend you do NOT do that.

    Posted: 3 years ago #
  3. You're missing a return value at the beginning of bb_benchmark_template_timer. The line should read:
    if (isset($can_administrate)) {if (!$can_administrate) {return $template;}}
    Without the return value, non-admin users get a page with two errors and nothing else.

    Posted: 1 year ago #
  4. You are right and I've updated that change, many thanks for reporting it.

    Strangely, it worked on my system, both in 0.9 and 1.1 for being logged in/out.

    I am calling it as an action, not a filter which in theory should not need a return value.

    But I wonder why it failed on your test.

    You might have chained filters which required the return value I guess.

    Posted: 1 year ago #
  5. http://phpxref.ftwr.co.uk/bbpress/bb-includes/backpress/functions.plugin-api.php.source.html#l307 - this should clear up a little confusion as to actions vs filters.

    It was only an error for logged in non-admins on my forum. It's fixed now.

    Posted: 1 year ago #
  6. What version of bbpress are you using Ben?

    Posted: 11 months ago #

RSS feed for this topic

Add a Comment

You must log in to post.