Preheat your oven to 350°F (175°C). Grease a 4x8-inch loaf pan or line it with parchment paper.
In a mixing bowl, mash the ripe bananas with a fork until smooth. Stir in the melted butter.
Mix in the baking soda and salt.
Add the sugar, beaten egg, and vanilla extract, and mix until well combined.
Gradually add the flour, stirring until just incorporated. If using, fold in the chopped walnuts.
Pour the batter into the prepared loaf pan and smooth the top.
Bake for 60-65 minutes, or until a toothpick inserted into the center comes out clean.
Let the banana bread cool in the pan for about 10 minutes, then transfer it to a wire rack to cool completely.