Code only answers are lower on quality scale because it is like giving a person a fish but not actually teaching them how to fish. Despite that deletion is not the only way forward because it is not quite bad enough to warrant deletion. They can still be improved provided the user is willing enough to add a good (or atleast some) explanation. So, I would say, use "Recommend deletion" only in extreme cases when it is unsalvageable.
Purpose of the review queues is not just to remove answers but to remove only those that cannot be salvaged by any means. Hence, in my opinion, the first step should be to let the user know how code only answers are unwelcome and unhelpful. You can use any one of the comments mentioned in this thread for this purpose.
Voting is completely your choice. I would downvote it only if the code only answer is from a user who has been a member of Stack Overflow for long enough to realize that such answers are unwelcome.
Below are a few cases and how I would have treated them:
- Answer is code only but is posted by a user who has been a member for less than a week (or) has less than 100 rep points - Leave a comment guiding them how it should be improved. I would sometimes "Skip" the review after leaving a comment to ensure that it stays in the review queue and others can act on it or improve it if OP doesn't take any action.
- Answer is code only, posted by an experienced user but is so concise that it can be understood even without an explanation - Leave a comment indicating how an explanation would still help novice users in future. I wouldn't downvote here.
- Answer is code only, posted by an experienced user and is rather complex even for a mid-level user to understand - This probably warrants a downvote because they are experienced enough to understand why it is a bad to give such an answer.
- Answer is code only and doesn't attempt to answer the question - Vote to delete it with a custom reason. There is not much point in retaining them. This doesn't apply to your question but I am mentioning it for completeness sake.
I am not saying reputation levels should always be a factor in decision making but just that new users could probably get better with some guidance.
Finally, a very welcome behavior would be to edit the answer to offer an explanation - if you have the free time and know the subject well enough to understand and explain the answer without being wrong. After all, as I mentioned earlier, the purpose of the review queues is not just to remove poor quality content from our site but also to improve the quality wherever possible.