The Saturday market is the reason to do this route in that order — you get the food situation handled early and the walk feels earned rather than obligatory. Buena Vista Cafe at 2765 Hyde St does Irish coffees worth stopping for; skip ordering food there. Fisherman's Wharf itself has souvenir value and the sea lions at Pier 39, but eat before you arrive — food options in the Wharf corridor are overpriced and mostly forgettable. Ghirardelli Square is a chocolate shop in a nice building; the novelty wears off fast. If you want Alcatraz, book tickets ahead at Recreation.gov — the standard day tour is the one to take. The F-line streetcar runs along Market and the Embarcadero and connects back toward Nob Hill if your legs give out.
If you have two hours only: Saturday morning at the Ferry Building. Walk the market, buy something, eat it outside facing the bay. Take the F-line back toward the Fairmont when you're done. That's the version of SF that holds up.