The first line is word for word 17:3. The second line goes somewhere entirely different, and it is difficult.
Quick answer
The same furnace image, redirected. At 17:3 the LORD tests hearts; here the test is praise, and what it measures is debated.
Read both lines
Reading the two verses together is the fastest way into this one. 17:3 said "The refining pot is for silver and the furnace for gold, but the LORD tests the hearts." This verse repeats that line exactly and then substitutes a different instrument: וְאִישׁ לְפִי מַהֲלָלוֹ, "and a man according to the mouth of his praise."
Why translations differ
Those four Hebrew words admit at least two serious readings and the NKJV picks one. It renders "a man is valued by what others say of him," making praise the measure of the man, which fits the chapter's interest in reputation at verse 2. The other reading takes praise as the crucible rather than the verdict: a man is tested by his praise, meaning what commendation does to him is the assay. On that reading the verse is far sharper, and it fits the furnace image better, since a furnace does not appraise metal, it applies heat and finds out what is there.
This expression is debated and the catalog does not settle it. Both readings agree that praise is not the harmless thing it feels like, and that something about a man becomes visible around it.
Related: Proverbs 17:3 · Proverbs 27:2 · Proverbs 25:27 · Proverbs 29:5
New King James Version®, Copyright © 1982, Thomas Nelson. All rights reserved. Full copyright information. Scripture provided by API.Bible.
Go Deeper
If this verse has been used to put weight on you that it was never carrying, ask about it directly.