Getting parameters by filename instead of hardcoding.

So it's come to my attention recently that a fair number of plugin support questions/"bugs" have been caused by the users not realising that they need to name the file exactly as per the string referenced in the call to Plugin.parameters...but what if that weren't the case? Having looked into this, I've come up with a potentially better way, but I'd like the opinions of other scripters in the community on this method:

Code:
var currentScriptPath = document.currentScript.src;
    var startIndex = currentScriptPath.lastIndexOf('/') + 1;
    var numChars = currentScriptPath.lastIndexOf('.') - startIndex;
    var currentScriptName = currentScriptPath.substr(startIndex, numChars);
    var parameters = PluginManager.parameters(currentScriptName);

This gets the name of the .js file that's being processed and gets its filename, then uses that as the argument to PluginManager.parameters. This means that no matter what a user calls the file itself, it'll still get the parameters appropriately.

Does anyone have any thoughts on this or potential issues I haven't considered?
There has been a topic about something like this shortly after MV was released, giving a way to get the parameters independent of filename.
I do not know what was described in that topic, but a lot of scripters simply ignored that option when writing their plugins - and that includes good scripters like Yanfly.

So there has to be a reason why it is not done - that reason might be simple lazyness, or it might be something else. But a method for this was known before.
I figured there would have been something about it before, but I'm curious as to what that reason is, as I can't think of any downsides to it myself.

Original thread: https://forums.rpgmakerweb.com/threads/getting-parameters-by-filename-instead-of-hardcoding.75370/