We have done 20 ocean cruises since 2010. Also, we have done just about every Med cruise there is.
I love planning our tours in the ports. The key is research, research, research.
Hiring a taxi or driver may work in some places, but in some places the cost of a taxi is quite high.
Better to look for private tours instead of the more expensive ship's tours. Many will guarantee that you won't miss the ship.
Sometimes, you can do a port on your own, without taking any tours. Examples would include Naples and Dubrovnik.
In Naples, you can walk to a train that will take you to Pompeii (just watch for pickpockets). If you want to see the Amalfi Coast, then a tour would be the best.
For Dubrovnik, you can do the city on your own. Also, if docking in Lisbon, you can walk up the hill to St. Georges Castle and then explore the city with an inexpensive taxi or public transportation. For most of the other ports, check for private tours. Use the internet.
If you can't find a private tour company, then check for shore excursions with Viator. We have never had a bad tour with them. They don't provide the tours, but use local tour companies. Also, you can book the tours and pay for them in advance, not having to carry a lot of cash.
Tours by Locals have great tours, but you have to organize the group yourself. If you have a large family or group, it works, but just for two persons you would pay a lot.