Q:

Must answers be limited to the code only?

Does the feedback for a Code Review question have to be limited to the scope of the explicit code cited, or can we infer direction and context and comment on that also?
For example, in this answer, I attempt to dig a little deeper than just the code on screen. Is this appropriate? I kinda think it is, especially since the code in question is security related and us devs seem to get a bad wrap for screwing this kinda thing up.

A:

No.
While alternative implementations without reviewing the code are usually unacceptable, going 'beyond' the code is certainly all-right.
Let's give some examples.
In security questions, people often tend to write their cryptography. That's a bad idea. So it's certainly allowed to point it out.
Other times, people are re-inventing the wheel without doing so on purpose. Teaching them it has already been done can be very valuable.
At the end of the day, people write questions here to learn something by having their code reviewed. Review and teach, even if the teaching goes beyond the reviewing.

A:

No.
@Mast gave a good example, and his last paragraph is quite correct, I'm just extending the concept a little bit.
In a professional software engineering environment code reviews will quite often be preceded by design reviews, in this environment only code should be reviewed for defects in a code review. Here on Code Review there is no guarantee that the design has ever been reviewed and therefore the intent and the direction of the code can be reviewed as well to help the OP.

