If you suspect an electrical socket may be faulty, there are steps you can take to check this. Electrical installations should be checked regularly anyway, so an electrical socket test is a good idea even when you think it's working fine. As well as visually checking, you can carry out a socket test safely using a socket tester.
A socket tester is a cheap and easy way to see what state the socket is in. It will indicate if the wiring is correct, identify bad wiring such as disconnected wires, and highlight the location of a fault. There are three different types of electrical socket testers: Simple, Advanced and Professional. As their names suggest, some testers are more comprehensive than others.
A Simple socket tester will show various good wiring in a socket but not necessarily very dangerous faults such as poor earth wiring. So it may make you think your electrical socket is safe even when it isn't. Both the Advanced and Professional will identify good and bad wiring, including the Earth Fault Loop Impedance value.
If a socket is shown to be unsafe, you should stop using it and get a qualified electrical engineer to take a look and make the necessary repairs or replacements.
Similarly, there are different visual tests you can carry out safely on an electrical socket. For example, a socket should not be loose or cracked and should not be used if found or suspected to be either. If you're unsure if a socket is loose, there is a quick test you can do involving a standard desk lamp. Firstly, make sure this lamp works by plugging it into a socket you know is safe and working well. Then plug it into the socket you think may be loose. Once plugged in and turned on, lightly shake the cord near the socket attachment. If the lamp light flickers there is an insecure connection in the wiring and the socket needs to be replaced.
Whether a socket is shown to have bad wiring by a socket tester or through a simple test carried out by test appliances, always stop using the electrical socket until a qualified person can inspect and take the necessary action.