“feared the king.” Here in 1 Kings 3:28, “feared” is the masculine noun yare (#03372 יָרֵא), and in this context, it primarily carries the emphasis of “held in awe,” then “respect.” There would also be a subtle underlying sense of fear, since the King brought the judgment of God to the people.
[For more on the biblical use of “fear,” see commentary on Proverbs 1:7.]
“the wisdom of God was in him to carry out justice.” The wisdom of God to judge justly is an attribute associated with the Messiah as well (Isa. 11:2-4; Acts 17:31).