I have stayed several times with my in-laws in Essaouira so have learned some tricks on how to eat the best food cheaply (and stay well).
The best option is some form of self-catering to take advantage of the amazingly fresh fish, fruit and vegetables on sale in the local market in the medina. Shopping is a really fun, exciting experience and the locals will not rip you off.
The fishmongers will prepare the fish for a small fee.
Anything you cook from such brilliant ingredients, even if it is just salad and grilled fish, will taste brilliant.
The one and only off-license shuts at 8pm every day and is located just outside the medina at the north entrance.
For breakfast (if you don't mind the potential calories) everybody universally agrees the best is Patisserie Driss just at the rear corner of the main square. Get there before 11am for the best choice of French pastries, fresh orange juice and good coffee.
For snacks, the takeaway pizza stands near Driss are all good.
If you want a more elaborate, heavy, traditional Moroccan meal, visit one of the small restaurants in the 'dog leg' off the main square, near the carpet shops. All offer standard set menus with tagine, traditional Harira, etc. All are roughly the same standard and price (although I've recently heard bad things about Petit Pearl).
If you like fish don't miss the cafe at the back of the fish market. You buy your fish then pay them to cook it for you. If doesn't get fresher than that!
Avoid fish stalls around the port, well known to serve old manky fish to tourists and responsible for many a tummy upset.
Essaouira - medina
Send your feedback or queries to email@example.com