Potentially a remote receiver intended to make the socket into a remote controlled outlet. I can't see any microphone so it's not a 'bug' but the inclusion of a DIP switch means there may be any number of them fitted, each with different DIP switch settings.
It's also potted in an epoxy resin...