The socket is attached to the cupboard I believe that alone is not allowed (part p), also it should be accessible so a switch plate above the work surface for isolation would be advisable and then maybe the washing machine hard wired.
As for the location to the plumbing joint, one would not chose to put a socket under a potential leek, which came first though, the socket or the plumbing. Don't know if there is a regulation for this though but it is just common sense.