Most of the time, writing a plugin or adding Libravatar support to an existing web application involves very little work.
For example, have a look at how it was done for these two Perl applications:
As you can see, all of the hard bits are done in the Libravatar::URL CPAN module. Which brings us to the most important guideline...
Use an existing library
If you try to do it all yourself inside the web application, it's likely that you will be missing a few corner cases (e.g. federation may not be fully working). As you can see from the API, having a complete implementation is not just a matter of changing the base URL.
What should you do if a library is not available for your target language? Well, why not write one? We'll be more than happy to help you in the process. Just come and talk to us.
Write a simple test page
In the legacy Libravatar source code repository lies a few test pages for some of the libraries that have been contributed.