Preheat the oven to 350°F (175°C). Grease the baking pan or line it with parchment paper.
In a mixing bowl, mash the ripe bananas until smooth. You should have about 1 cup.
Add the granulated sugar, brown sugar, and melted butter to the mashed bananas. Whisk until well combined.
Beat in the eggs and vanilla extract, mixing until smooth.
In another bowl, combine the flour, cocoa powder, baking powder, baking soda, and salt.
Gradually add the dry ingredients to the banana mixture, stirring until just combined. Be careful not to overmix.
Fold in the chocolate chips if using.
Pour the batter into the prepared baking pan and spread it evenly.
Bake in the preheated oven for 25 minutes, or until a toothpick inserted in the center comes out clean.
Allow to cool in the pan for about 10 minutes before transferring to a wire rack to cool completely.
Cut into squares and serve.