Github Trending Repositories WordPress plugin

The WordPress world is fascinating. The WordPress both as a cms and a blogging platform is awesome. When it comes to extending the WordPress capabilites plugins are the go-to solutions. The main benefit behind using plugins is the loose coupling they provide in our code which WordPress as a whole constantly strives for. This loose coupling not only helps in the maintenance of our code but also its reuse.Striving in the direction i made another step at building some useful plugin that didn’t already exist on the WordPress plugin directory. This time the idea was building a simple widget that showed the latest trending repositories on github.

The challenge here was that the github api doesn’t provide anyway to retrieve the trending repositories but i overcame it by building a rest api using some online service that constantly crawles the trending page for data.

So i was on track to building the 150 loc plugin. The widget shows latest top six trending projects on github.The data is cached using the WordPress transient api for 30 minutes before being discarded. The sole aim behind caching was to prevent too many requests and it also was in line with the rate at which the list of trending repos changes on github. The plugin can be found here in its glory.

Hello Rumi Wordpress Plugin

plugin in work

Wordpress is awesome when it comes to extending its capabilities. One can easily extend wordpress capabilities by adding new functionality as plugins. The advantage of adding new functionality as plugins is in sync with the wordpress notion of breaking things into modules which helps in code maintenance. Secondly when doing theme changes the developer has not to worry because theme changes won’t effect the plugin. Wordpress has a huge collection of plugins build by developers around the world. Most of the plugins are availabe on Wordpress.org website. In this case i have also developed a simple plugin which is actually based on the Matt Mullenweg’s Hello dolly plugin. The plugin shows a quote at the top right corner of every admin page. The quotes are written by the great mystic sufi poet namely Rumi. The plugin is available here.You can install it in your wordpress sites and enjoy the spiritual essence of the quotes while developing.

Wordpress wp-content directory and the Empty index.php file

The Wp-Content directory stores everything for customizing wordpress.The diretory consists of themes,plugins,uploaded media and additional files to extend wordpress in any way imaginable.The wp-content directory and the sub-directories within it contain an index.php file.The contents of the file are

<?php
//Silence is golden.

So,what’s the point of this file ? Actually it is very important file. The index.php file blocks anyone from viewing a directory listing of the your wp-content folder.If the index.php file didn’t existed and the web server allowed directory listings, then http:yoursite.com/wp-content/ would display all the files and folders in that directory.The implications of which you can understood yourself.So this file exists as a securtiy feature and should not be deleted for non-presence of content.