How shall I put this? It would be a big mistake to try to hit all three of those places in the time you have available. Bilbao and San Sebastian are way east of Santiago de Compostela and Porto is south. You plan to spend Sunday and Monday nights in SdeC and you'll need to be back in SdeC on Friday night for your Saturday flight. That only leaves you 3 nights to play with (Tuesday-Wednesday-Thursday). I wouldn't want to travel all the way across northern Spain twice for so little time at my destinations. Among other things, you'd be blasting past (or tolerably near) some very interesting places you could visit with less expenditure of travel time--places like Leon, Oviedo and Burgos.
Porto makes a lot more sense to me with so little time. Even it isn't a piece of cake, because transportation across the border is infrequent. Once across the border there are several interesting options if Porto doesn't keep you fully occupied for your two full days and two partial days: Viana do Castela, Braga and Guimaraes.
Another thought: SdeC is by no means the only attractive place in Galicia. A Coruna on the northern coast is quite nice, and I liked the smaller city of Betanzos as well. On the western coast SW of SdeC are Pontvedra and some small, typically rather touristy, towns like Cambados and Combarra. The Galician countryside is quite attractive, too.
What sort of transportation do you plan to use? There are no super-fast trains in the area you plan to cover--quite the contrary. It's over 10 hours from SdeC to Bilbao by train! ViaMichelin estimates over 6 hours if driving, but that includes no stopping, getting lost, looking for parking, etc. Also no time dealing with the car-rental agency. Either way, that's a lot of time in transit for not many hours at the destination.
What time of year is this trip?