The CFG->httpswwwroot utility was removed in Moodle 3.4 and, since then, it continues being there but only as an alias to allow old plugins to continue working the same.
There isn't any way, in code, to inform developers about that removed (but aliased) setting.
So this issue is about consider adding the check as part of the plugin analyze reports. Can be a custom check (easy to grep), or something built on the code-checker... anything.
But we need to keep contrib developers aware of that legacy setting.