I've tried it on a few sites and it seems to work as expected. It also improved the PageSpeed Score by 3-4 points. Nice job!

The only issue that I came up with, was that if you download the woff2 fonts and then decide to add the woff parameter (or vice-versa), fonts will not get updated accordingly unless you manually delete the newly created fonts folder (I already submitted the issue on GitHub).

FYI, for my convenience, I've included it in a helper plugin that I use (https://wordpress.org/plugins/slash-admin/) so if someone wants to play with it without messing with the code, can give it a try (The related option is under Tools / Slash Admin / Frontend / Fonts)