The text is a well-known proverb from Shakespeare's play 'The Merchant of Venice' that means not everything that looks precious or true turns out to be so. It does not exploit different meanings of a word or similar-sounding words for humorous effect.
All that glisters is not gold .