Justin Hunt, one of the developers with a lot of plugins under his hat in Moodle community,has presented about writing new Moodle plugins during the iMoot 2015 (#imoot15).
The presentation is a must watch for all the new developers who wants to build Moodle plugins. In the presentation he describes the basic file structure of the Moodle plugins and using the new plugins templates for different types of plugins.
You can watch the video embedded below and here is the direct link.
Believe me guys this is the first video you would like to watch before starting developing plugins for Moodle. It is worth watch of approximately 50 minutes.