Special page names (as in SpecialPage::getName()) and canonical special page names in English (SpecialPage::getLocalName()) are distinct but easy to confuse concepts, leading to gotchas like this:
$title = MediaWiki\MediaWikiServices::getInstance()->getSpecialPageFactory()->getPage( 'UserLogin' )->getPageTitle(); $title->getText(); // UserLogin $title->isSpecial( 'UserLogin' ); // false - UserLogin is the canonical name, should have used the plain name which is Userlogin
A coding convention to make this less mistake-prone, which is used in some places but isn't widespread, is to store the special page name in a constant (named in a standard way). You can then use that constant in Title::isSpecial(), SpecialPage::getTitleFor() etc. Besides avoiding mixups and typos, it also makes it easier to find all code related to a special page.
A handful of extensions use a PAGE_NAME constant on the special page class for this. (The one exception is Wikibase which uses SPECIAL_PAGE_NAME instead.) It would be nice to agree on this pattern and promote it in the documentation, in the Examples extension etc.