Here is the link to the theme-component that implements this Unformatted Code Detector - theme-component - Discourse Meta
It works by calculating a score for the post and if its high enough it assumes that there
is code that is not in pre-formatted text markup.
Give how often new posters are not aware of how to post code and we have to mentor about pre-formatted text before getting on with helping people this seems like a very useful automation.