From
https://www.mediawiki.org/wiki/Thread:Talk:ResourceLoader/V2_testing/Unable_to_hide_a_gadget
The "hidden" option is not working for this gadget[1]. It appears on [2] even after I hide it[3]. Indeed, the loop[4] which adds a preference for each gadget doesn't check for its hidden property before adding it to Special:Preferences (BTW: it also doesn't check if the user has the appropriate rights).
[1] http://rl2.wmflabs.org/rl2-repo1/wiki/Gadget_definition:test.js
[2] http://rl2.wmflabs.org/rl2-repo1/wiki/Special:Preferences#mw-prefsection-gadgets Special:Preferences#mw-prefsection-gadgets
[3] http://rl2.wmflabs.org/rl2-repo1/w/index.php?title=Gadget_definition:test.js&diff=prev&oldid=462
[4] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Gadgets.git;a=blob;f=Gadgets.hooks.php;hb=refs/heads/RL2#l305