Went years ago on trip around Europe (quick diversion into North Africa) so pretty much a student kind of trip with cheap accommodation. Definitely worth visiting especially Jemaa el-Fnaa square where there's lots of hustle and bustle - water sellers, acrobats, snake charmers, dentists pulling teeth with pliers from their poor customers who sit on a wooden chair with everyone watching but I was much more impressed with Fez. Fantastic labyrinth of a city where you really think you have travelled back thousands of years.
Got robbed by the police in Rabat who pretended to check our documents at the train station but later we realised they had nicked our cash!
The square as mentioned Pickpockets abound and don't get lost in it - although an official tour will take you to my Uncles shop you should be safe - some beautiful areas in the mountains with the Berber people preferably on a motorcycle