I think Morocco is a little more dangerous than Europe, but it should be generally OK. Dress a little conservatively- they all do, after all. I did see a hippie couple at the Hassan 2 Mosque, in shorts and tank tops, shooting photos and hanging out, and nobody bothered them, so it’s not that bad.
Speaking some French helps a lot, too. Spanish might help too, but I don’t speak any so I don’t really know.