Hello Dolly OOP http://briangallagher.ie/2014/03/04/writing-a-maintainable-object-orientated-wordpress-plugin/