It may be a little hard to see, but the picture shows an exterior light that has been wired with an extension cord. Believe it or not, this is actually (and unfortunately) common to see on home inspections some days.
An extension cord in this situation is very dangerous. They are made for temporary use and extension of electrical power, not for extended use to wire a permanent fixture. It makes it especially dangerous that the wire is outside the building, not protected, and not even fully put into the wire casing.
Using anything outside of its designed format is generally not a good idea, but especially not anything electrical.
Dave Graham, Tempest Home Inspection. Calgary Alberta