Yes, Avril Lavigne wrote the song together with the same people she wrote "What The Hell" and also at the same time :) That's why it sounds like an Avril song. It is an Avril song! :D
And Miranda's voice is really similar to Avril's.
It would be great if Avril's version had made it on "Goodbye Lullaby".
Miranda rocks it too!