I've done something similar in 2016 but with different destinations and less time. The airport is tiny and you definitely want a transit visa. I got mine without any problems and it was cheap (got it in Lisbon). You can catch a taxi into the city, have some good seafood and head back.
I only had less time than you and got a nice tour from a friend who works there, and then we went for dinner somewhere in Ilha do Cabo.
Yes, it feels like a developing country, and there are dangers associated with that (e.g. don't walk around with visible valuables).