That is an electrical fire waiting to happen. Just the slightest bump is enough to toss that whole fan in your tank, kill everything in your tank and possibly start an electrical fire.
I would screw that to your wall in a way that if it becomes disconnected it will fall on the floor not in the tank.
That is exactly wjay I was thinking. I have a 4yr and a 2yr old kids,that would end up in my tank instantly.

