Is it unfair for paper circumstances to play a role in the review of the paper?
No, your review should not change based on knowledge of the authors' circumstances. Your role is to give the editor an objective assessment of the strengths and weaknesses of the author's submitted manuscript. However, you can still help less advantaged authors. Write your review to focus on the strengths and weaknesses of their work, and leave the authors to choose how they wish to address these.

To take your example: suppose that the authors have developed a new algorithm for X, which you consider to be a worthwhile contribution to the field. However, they go on to claim that their algorithm outperforms the current standard, based on only one test-case.

An unhelpful reviewer might write:
"This paper has potential, but it cannot be accepted unless the authors run more test-cases". A more helpful review would be: "The algorithm in this paper appears to be a useful contribution, and it is deserving of publication. However, I do not feel the authors currently have sufficient evidence to support their unqualified claims regarding performance, and this should be addressed before acceptance."

By doing this, you leave the authors with a choice: they can either run more experiments, or they can put caveats around their discussion of performance. (Of course, you should only do this if you feel the paper is publishable in such a form.) A wealthy research group will likely choose the former option, a less well-off one might settle for the latter. However, both have been held to the same standard of scientific correctness.