• WebCodePoet

    (@senjoralfonso)


    wp_statistics_quickstats_metabox_get_data needs long to load, from 5 to 13 seconds. That slows the admin dashboard very much. Any ideas about this?

Viewing 1 replies (of 1 total)
  • Plugin Author Mostafa Soufi

    (@mostafas1990)

    Hi @senjoralfonso,

    Thanks for reporting this and sorry it’s been slowing your dashboard down.

    wp_statistics_quickstats_metabox_get_data is the AJAX endpoint for the “Traffic Overview” dashboard widget. On each load it computes traffic for Today, Yesterday, the last 7 and 28 days, and an all-time Total. The all-time Total runs an unbounded aggregate against the wp_statistics_visitor table, and on installs where that table has grown large that single query is usually what’s responsible for the multi-second load you’re seeing.

    A few things worth checking on your side:

    • The size of wp_statistics_visitor (and wp_statistics_pages). If they have millions of rows, that’s almost certainly the cause.
    • Whether a persistent object cache (Redis / Memcached) is enabled — without it, the widget can’t reuse results between dashboard loads.
    • Query Monitor on the Dashboard page will show you the exact slow query if you’d like to confirm.

    In the meantime, you can stop the slowdown immediately with one of these:

    1. On the Dashboard, open Screen Options (top right) and uncheck “Traffic Overview“, that prevents the AJAX call from running for your user.
    2. Or, in WP Statistics → Settings → Display, enable “Disable WordPress dashboard widgets” to remove all of our widgets from /wp-admin/.
    3. If your visitor table has grown a lot, consider setting a data retention period under Settings → Advanced so older rows are pruned automatically.

    We’re tracking this on our side and looking at caching the all-time Total so the widget doesn’t re-scan the visitor table on every dashboard load. I’ll update this thread as soon as that lands.

    Thanks again,
    Mostafa — WP Statistics

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.