The eyes represent seeing, and seeing represents thoughts or judgment. The writer speaks of what a person does as if that person were walking down a path. Alternate translation: "A person thinks that everything he does is pure" or "A person judges everything he does as pure" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here the word "spirits" represents people's desires and motives. The writer speaks of Yahweh discerning and judging a person's desires and motives as if he were weighing that person's spirit. Alternate translation: "Yahweh judges the person's motives" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-metaphor]])