When you hop off the Cruise Terminal, you can walk by the beach for a few minutes until Rotunda da Anémona and then take bus 500 to Praça do Infante, in Ribeira. On your way back to Leixões, you may want to take the classic tram from Praça do Infante till Passeio Alegre, which is slow, but surely quaint — especially on a sunny afternoon.
Photo allegedly courtesy of Rui Jorge Pires
I would not recommend that you take the metro from Leixões till Ribeira. Firstly, it is infamously slow, as it is actually a (surface) tram until it reaches central Porto. Also, it is slow while traveling in uninteresting parts of Matosinhos and Porto — unlike the classic tram, which is surely slow but slow while traveling by the beautiful riverside. Secondly, the metro does not stop in Ribeira. It stops in Trindade. Then, you either take the metro to São Bento or Jardim do Morro and then walk downhill, or you walk downhill from Trindade itself.
Related: Looking for a sunset spot in Porto, Portugal