Support » Plugin: FV Gravatar Cache » A few suggestions for this awesome plugin

  • roam92

    (@roam92)


    Gravatars are a cool idea and add a lot to the community and personal feeling of blog comments, but they way they are implemented out-of-the-box in WordPress is a resource hog… Fortunately, this terrific plugin completely mitigates that issue, and does it in very clever fashion. Thank you!

    I have a handful of modest suggestions that can help make this great plugin even better:

    1. Normally when installing a WP caching plugin, the caching goes on immediately and you can see the effect virtually right away. Here it works differently – and at first I wasn’t even sure that it was even working and so I deactivated it. It wasn’t until I dug further and learned more that I realized what was going on.

    But for most people new here, it could help to throw up a quick banner on the WordPress dashboard explaining what the story is: how the plugin works through cron, the time it takes, and what options need to be checked and/or configured. It could really help!

    2. I couldn’t figure out what “Current Cron Offset” meant. From looking at the code, I got it. You might consider renaming this to be: “Working on X out (of Y total) commenters”, where X is the cron offset value. It would be clearer for non-techies.

    3. Speaking of the source code, it could be helpful to have $time_taken as a user-configurable option… On my server, I had to increase it from 2 seconds to a larger timeout number, otherwise the plugin would have never gotten through thousands of comments in any reasonable time. Possibly have it range from 2-10 seconds?

    4. You might also consider having the “Daily cron” option checked by default, or at least mention this option in the dashboard banner from the first suggestion. 🙂

    5. I noticed you have a small function that allows the plugin’s cached gravatars to be put on the Rocket CDN… That’s great. I have a CDN for my blog, but can’t run the WP Rocket plugin. So I added the following simple PHP code snippet to make this work for my site:

    function get_rocket_cdn_url( $url ) {
    	return str_replace( home_url(), 'https://your-cdn-url-goes-here.com', $url );
    }

    So this fake-out stub allows the cached gravatars to be served from my CDN. But it could be a great option to make available for users, similar to how the Autoptimize plugin does it (called “Enter your CDN root URL to enable CDN for the plugin’s files”).

    6. Finally, a quick tip. I found that by selecting the first Default Avatar (“Mystery Person”) under my WordPress Discussion options, and then uploading 1x and 2x resolution images named “mystery*.png” to /wp-content/uploads/fv-gravatar-cache/ (replacing the existing copies that are there), I could easily and elegantly change my site’s default gravatar to anything I like, universally. Awesome.

    Thanks again for this superb plugin!

  • The topic ‘A few suggestions for this awesome plugin’ is closed to new replies.