For the most part the the FAQFAQ seems a bit fuzzy on this matter, but I think the telling line is the first.
Code Review - Stack Exchange is for sharing code from projects you are working on for peer review.
(emphasis existing)
If the question is using example/place holder, then I would say it's off topic. If the question is using actual code and just asking if it complies with best practice then I would say on topic.
Compliance with best practice is in the list of things that may be commented on and the OP is allowed to ask for a focus on a particular type of critique, though the answer may still comment on other aspects.
Your third example seems on-topic based on my interpretation of the FAQ. If we decide that we don't want such questions then we should probably update the FAQ to be a little clearer on the matter.