Per @Umherirrender's public gerrit comments, we should address the following issues related to the deployed/backported security patch for the PermanentlyPrivate bug T207094:
- Revision::newFromId - line 1787 - "This seems uncached, at least it is unbatched. This mixed database queries in the formatting code and may slow done the whole page"
- Exception - line 1807 - "There are some maintenance scripts which can lead to this situation. It is also possible that the delete or undelete is in process and finished between both queries."
- $rev->userCan - line 1812 - "userCan needs a user to avoid $wgUser"
- Linker::commentBlock - line 1815 - "There is Linker::revComment which handle these message and styling for such messages (grey + strike)"
Also, test coverage apparently decreased for this patch, so we might want to add/update tests accordingly.