Showing information from a plugin hosted on
Example of the information in this script that is displayed.

A simple piece of code to fetch plugin information about any plugin hosted on and display on your own website. If you have built your own plugins and publish them on, you might want to display some basic stats about the plugin.

With this shortcode you can show the basic details on your website. I am using the same code to display the plugin information on Delete Duplicate Posts plugin page.

The output is cached for an hour, so the data is not refreshed on each pagevisit. As you might want to use the shortcode for different plugins, there is a unique CSS id generated for each plugin as well as the more general CSS class “plugin-data”. See below CSS code for more details.

The code is mixed from different sources and in the process I lost the links, so if you recognize the code please let me know so I can set up proper attribution.

Get and display plugin information from repository via shortcode. –


CSS Styling

Some CSS styling is needed to make the shortcode look good. Instead of editing the text output, I added text via CSS.

For instance, the text “Downloaded xx,xxxx times”, I added “Downloaded” and “times” using the :before and :after pseudo CSS classes.



Do you develop for WordPress? Check out some of the other posts here: WordPress Optimization Tips – header.php or 301 redirects for 404 spam pages – WordPress Style – more can be found in the blog.