Pepe helped to fill a problematic position for the Blancos, with many having failed before him when completing big-money switches to the Spanish capital.
He believes a solid grounding with Porto helped him to succeed, telling UEFA’s official website: “Porto improve every single player because this is a very demanding club.
“Porto prepared me really well and this didn't go unnoticed in Spain, as before I went to Real Madrid the club were known as a graveyard for centre-backs. They had amazing centre-backs that had failed there.
“I came from a league viewed by many as not as competitive as others, but I played for 10 years and won many trophies.”
Pepe is now back at Porto and believes there a number of players currently on their books who would not look out of place in Madrid, with Militao having already agreed a €50m (£43m/$57m) summer switch.
“I'll always say it was football that gave me everything in life – lots of friends, the chance to make my dreams come true,” added Pepe.
“Returning to Porto was also my dream – to come back to the club where I was so happy. This is a team that taught me a lot and made me the player I am today.
“The first time [I joined] was difficult because I'd left a small island to come to the mainland. I had to adapt very quickly because this was just after Porto had won the Champions League.
“Yet I identified strongly with the club, the people at the club made me feel very comfortable and provided the best working conditions for me.
“Now I'm back here with Porto, with a lot of good central defenders. Defenders who, in my opinion, could very well be playing for a club like Real Madrid because they've a lot of quality. So much so that Militao was bought by Madrid, right?!”
Before heading to Spain, Militao is looking to help Porto prolong a Champions League adventure in 2019, with Pepe and Co currently readying themselves for a quarter-final clash with Liverpool.
“[I have already won the Champions League three times] and this season it's going to be four, God willing!” said Pepe.
“We know we have a very difficult task, against a strong team who play in the style of their coach.
“But we have to be ourselves, we have to be the same team we have been in this Champions League campaign, a cohesive team that fight for everything, looking for a positive result, looking to score goals – being ourselves.
“We have to respect Liverpool, who are a great team, but we are going to do our job.”