To be honest, I think bettas, African dwarf frogs, shrimp and snails are the only fish that should be in a 5 gallon tank. Bettas are solitary so you don't have to worry about room for an entire school. African dwarf frogs do well alone and can be kept as a pair in a 5 gallon if both are male or one is male and one is female (2 females get a bit large to share a 5 gallon). Shrimp and snails would have a field day in 5 gallons.
As far as a "5 gallon community tank" is concerned, this is my list.
1 betta + shrimp (Shrimp have small bioloads, but don't go overboard)
1 betta + snails (snails have huge bioloads for their size)
2 male African Dwarf Frogs (pushing the bioload a bit ^_^;)
1 betta + 1 African Dwarf Frog
But that's just my opinion. I like to give my fish more than just enough swimming room so I always understock my tanks a bit. :)