So someone asked me an interesting question today. Or maybe it was yesterday and I just noticed it today. In any case, I decided to give them an answer.
The question was: How exactly has Harry not gotten into trouble for all his magic outside of school?
My answer for this is that the trace is something of a JK Rowling plot hole. She claims that the trace is something on an underage witch or wizards wand, then goes off and makes it so that any magic used around Harry is detected.
To me, when someone says there is a trace on a wand, it means it is just on that wand and can only detect magic being used by that wand. If that specific wand is not being used to cast magic then no one is going to detect the unlawful use of it.
Consequently, this also means that if Dobby used magic near the wand, or if Harry used wandless magic, the Ministry would not know about it. Anyways, I hope this helps.