Depends, if you're doing largely front-end code (like embedding an iFrame to some chat application) then a widget works best. If you want to modify the API or save things into the database, then a plugin is right for you.
I think your best bet is to figure out what you need to do, and then find a plugin that does something similar, and modify that plugin, or take code from it (it's open source afterall ;))
@CyanPrime not sure how that's fixed it as your route inside theme.less doesn't actually point to the vanilla template. For that file to point at vanilla, you'd be looking at ../../../nodebb-theme-vanilla, but if it works then, so be it. 😆