We stayed at La Maison Arabe (which is considered a riad and I believe the oldest one within the medina walls), and it was lovely. Very clean, charming, great service, wonderful breakfasts, fabulous location). We also walked to the riad that was build by Richard Branson's sister (I believe it was called El Finn) where some friends at stayed on a previous trip, and it was lovely/charming, too.
Riads are generally smaller (I think) than hotels and often represent more of the local charm, culture. I feel we made the right decision by staying in one.
There are several ways to approach your trip, but we flew into Barcelona (spent 4 nights there) and then flew to Granada (by Vueling) and spent two nights there, then had a driver take us from Granada thru Gibraltar (my husband wanted to see it), and then to our overnight in the old town section of Marbella (which was charming/comfortable), then we had the small hotel arrange a driver to Malaga (from which we flew to Morocco on Royal Air Maroc). Then our flight home was from Marrakech and without looking up our previous flight schedule, I remember connecting thru Amsterdam before arriving in the US. For us not looping back to Spain just seemed more efficient/quicker for our flight home.
Which approach is better depends on flight schedules, price, etc. and also what you want to visit and in which order.
We found Spain more relaxing than Morocco. And, because you have to be much more careful with food/water in Morocco, we figured we would put that section at the end of our visit.