Preheat oven to 350°F (175°C). Grease and line a 9x13-inch baking pan.
Mash the ripe bananas until smooth and set aside.
In a bowl, whisk together flour, baking powder, baking soda, and salt.
In another bowl, beat butter and sugar until light and fluffy.
Add eggs one at a time, then stir in vanilla and mashed bananas.
Mix in sour cream or yogurt until smooth.
Gradually fold in the dry ingredients until just combined.
Stir in nuts or chocolate chips if using.
Pour batter into the prepared pan and bake for 35–40 minutes, or until a toothpick comes out clean.
Cool before slicing and serving.