How to adapt plug-ins to different versions

I’m writing a plug-in for rhino 6.23.20055,It’s some simple functions I hope it can work in rhino5,rhino7 and other versions of rhino6 not only in 6.23.20055.How can I do?