Pipe is an individuality (metaphor)
Being an excellent observer, Sherlock is able to provide a detailed analysis of any object, and each object bears more information than the person himself. In the given story, a pipe is a thing that tells much about its owner: “Pipes are occasionally of extraordinary interest, nothing has more individuality, save perhaps watches and bootlaces. The indications here, however, are neither very marked nor very important. The owner is obviously a muscular man, left-handed, with an excellent set of teeth, careless in his habits, and with no need to practise economy.”
Secret that brings troubles (metaphor)
Mr. Grant Munro couldn’t live on knowing that his wife has a secret from him, and the most horrid thoughts occupied his mind. As he said “In the cottage lay the secret which was casting a shadow over my life.” The secret acquires features of troubles, and the metaphor becomes personification.
Theory (metaphor)
Sherlock never goes to solve a crime without a theory made up. He always has in mind surmise which “at least covers all the facts”. And every “new facts come to their knowledge” help him to add to the theory some new assumptions. The theory is a metaphoric representation of Sherlock’s way of thinking; everything for him is a theory unless he has a confirmation.