Stone Town is an interesting African city. It is a maze of narrow streets with a very small portion of it being designed around tourists.
I would recommend 1 day maximum here.
You can shop here, take pictures of the coastline, some old buildings, as well as take boat rides to local islands (such as Prison Island which is well worth while)
Other than that you will probably be bored of Stone Town within a couple of hours.
It felt safe during the day but I would not want to walk here at night. The streets are very narrow and it would be easy for someone to hide in a corner to rob you. We were also there after 2 foreign women were attacked with acid thrown in their faces so there are crime issues against tourists than need to be contended with.
Overall this is not a must see city but if you are in Zanzibar it is still worth the effort to visit for at least a couple of hours.
If you own or manage Stone Town, Zanzibar, register now for free tools to enhance your listing, attract new reviews, and respond to reviewers.