Ye shall do no unrighteousness in judgment
This is said with respect to judges and witnesses, as Aben Ezra notes; that the one should not bear false witness in a court of judicature to the perversion of justice, and the other should not pronounce an unrighteous sentence, justifying the wicked and condemning the righteous:
thou shalt not respect the person of the poor;
that is, in judgment, or in a court of judicature, when a cause of his is brought before it; though privately his person may be respected, and he relieved in his distress as a poor man; but in a court of justice his person and character as a poor man are not to be regarded; the cause is not to be given either for him or against him on that account, without regard to the justice and equity of it; he may be pitied in other respects but in a cause between him and another, even a rich man, not pity, but justice, must take place, (See Gill on Exodus 23:3):
nor honour the person of the mighty;
not fear to put him to shame and blushing, by giving the cause against him, if he is in the wrong; his riches, his grandeur, his honour, must not came into any account, or have any weight or influence on the court to pervert justice: the Jewish writers, particularly Maimonides F26 suggest that there was to be no difference between a rich man and a poor man while their cause was trying; that they were to be clothed either both in a rich habit, or both in a mean one; and that their posture was to be alike, whether sitting or standing; as well as that no favour should be shown to one more than to another; as that one might have liberty to speak as much and as long as he pleased, and the other bid to be short; or the one be spoken tenderly to, and the other harshly:
[but] in righteousness shall thou judge thy neighbour;
be he rich or poor, doing justice to both, and showing no partiality to either; see ( Proverbs 18:5 ) .