• Hi, I just noticed when enabling the dashboard widget it slows down the admin area, it takes longer time to open. so I just disabled the dashboard widget.

    I am okay with that, but thought to write this in case someone is experiencing the same issue, just disable it and it will be functioning as normal.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter wordpresser

    (@mohammedays)

    I just reset helpful, and data now are erased, the admin area is no longer slow, now it is fine. so. probably because I had too much votes and now it is cleared.

    Thread Starter wordpresser

    (@mohammedays)

    I wonder if there is a way to auto delete the helpful entries?
    like auto delete every week or month something like that, or I have to do it manually?

    thank you

    Plugin Author Pixelbart

    (@pixelbart)

    Hello @mohammedays,

    Thank you for your feedback!

    Currently there is no automatic deletion, simply because it doesn’t make sense if you want to measure how well something is performing. Especially the history is important here.

    If your dashboard is too slow, you can enable caching. This can be done directly in Helpful’s settings, under System. Helpful should display several 10,000 votes without any problems.

    Otherwise you can build a solution yourself to delete ALL entries automatically after 7 days. Without cronjobs you can just do that with transients – directly in admin_init, if you are interested.

    So this you can put in the functions.php and then it will be executed every 7 days. The important thing is that it is also run once at the beginning. After that then every 7 days.

    
    // only in admin area (use init, template_redirect or something else, for every page in the fronted)
    add_action('admin_init', function() {
        // seven days in seconds
        $seven_days_in_seconds = DAY_IN_SECONDS * 7;
    
        // transients, deletes itself automatically after seven days
        $transient = get_transient('helpful_auto_delete');
    
        // fires only, if the transients is not set
        if (false === $transient) {
            global $wpdb;
    
            // db table name
            $table_name = $wpdb->prefix . 'helpful';
    
            // db query for truncate table
            $wpdb->query("TRUNCATE TABLE $table_name");
    
            // stores a transient for seven days
            set_transient('helpful_auto_delete', time(), $seven_days_in_seconds);
        }
    });
    
    Thread Starter wordpresser

    (@mohammedays)

    thank you @pixelbart , I had a big number that why it was slow I think, do you think the cache would help with that? should I do cache storage time for a week or month maybe?

    Plugin Author Pixelbart

    (@pixelbart)

    @mohammedays

    I would start small first and see how it goes. You can always set it higher. The only important thing is that you only delete the votes in an emergency, so that you still know next month what performed well last month.

    Personally, I am with a good hoster and have caching active for only one hour. So I can repeatedly call the dashboard within an hour without all the data being pulled each time.

    Thread Starter wordpresser

    (@mohammedays)

    @pixelbart I will go with caching, is there a way to purge cache?

    Plugin Author Pixelbart

    (@pixelbart)

    @mohammedays

    You can perform maintenance in the settings under System. This should clear the cache. A “bookmark” or a faster option does not currently exist.

    Thread Starter wordpresser

    (@mohammedays)

    @pixelbart great thank you so much for the help. I really appreciate your time.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘dashboard widget slows down the admin home page’ is closed to new replies.