Cream the butter with the sugar and grated lemon zest until smooth.
Add the eggs one by one and continue mixing. Add the next egg only after the previous one is well incorporated.
Incorporate the vanilla essence.
Mix together the flour and baking powder, then add to the mixture together with the pistachios and almonds. Mix with a spatula in a wide circular up and down motion.
Pour the mixture into a 10x22cm (4x8-inches) baking pan lined with parchment paper and bake for 50 minutes.
The cake is ready if a toothpick inserted into the middle of the cake comes out clean.
Let the cake for 15 minutes in the pan, then transfer to a cooling rake to cool completely.
For the cream cheese frosting:
For the cream cheese, mix the butter with the cream cheese and powdered sugar.
Spread the cream cheese over the completely cooled cake and sprinkle with coarsely chopped pistachios.