Hmm yeah, the techniques suggested in the OP are pretty outdated (which makes sense, given it was written in 2016 ).
Nowadays this kind of thing should be packaged up in a git repository and published as a theme-component for people to install and configure via the settings.