Preheat the oven to 180 C / Gas 4. Grease a 20cm (8 in) square cake tin then line it with baking parchment.
Beat the eggs and the sugar in a bowl, until light and fluffy.
Melt the butter in a saucepan at a low heat or in the microwave and pour into the egg mixture when melted. Add the cocoa powder and mix. Sift the flour and fold into the mixture along with the pecans or chocolate chips. Pour the mixture into the prepared cake tin and smooth the top.
Bake for 40 to 45 minutes until a skewer inserted into the centre comes out clean.