Naughty Code and Safety Violations

Examples of Bad Electrical Wiring

Dear Mr. Electrician:  The home inspector said my house has a lot of naughty code and safety code violations.  How can I identify the problems and make code compliant electrical repairs myself?

Answer:  Without experience and knowledge you will not be able to identify all of the naughty code and safety code violations or make proper repairs.  NOTE: Some text links below go to applicable products on Amazon.  As an Amazon Associate I earn from qualifying purchases.

It is also important to identify and implement safe work practices even if you are working alone on your own home.

Repairs can sometimes be more challenging than installing things new.  You have to work within existing spaces and finished walls and be a lot neater doing the work.

Do a lot of research.  Read books, watch videos from reputable producers such as This Old House.  Each building code violation will require a distinct code based solution.

Talk to a few electrical contractors.  Ask a lot of questions.  You may be able to get an idea of what corrections need to be done and maybe how.

Sometimes other trade skills are needed in the course of doing electrical work.  The electrical trade learning curve is very great with a combination of classroom training and several years of working under experienced people.  In addition an investment in specialty tools is required.


I have made many repairs to DIY wiring and have observed many code violations and poor installation methods.  Below is a partial list of common electrical wiring mistakes I have encountered.

Upside down ceiling electrical box with a ceiling fan bracket attached
Upside down ceiling electrical box with a ceiling fan bracket attached

The wife called me after her husband tried to install a ceiling fan.  Above is what I found when I arrived.  I think this was the first time I had ever seen an electrical box installed upside down in the ceiling.

The homeowner removed the existing builder-installed plastic electrical box, but instead of buying an old work fan brace and box which would have fit through the existing hole, he did this.  The ceiling fan support bracket was attached to the back side of the electrical box.

That electrical box was not rated for fan support and installing it upside made it inaccessible.

See my posts about ceiling fans for more helpful information.

Light switch with the ground wire looped around one of the ears on the switch strap
Light switch with the ground wire looped around one of the ears on the switch strap

In the photo above  I found this wall switch was improperly grounded by just having the grounding conductor looped around the ear of the device.  This was an old switch that did not have a green ground screw on it.  I replaced it with a switch that did have a ground screw.

Click to see my post about grounding outlets and switches depicting various methods of grounding electrical boxes and devices.

Not reading or consulting the newest edition of the “National Electrical Code” (NFPA 70). It is imperative that electrical wiring be installed in a safe manner.  The NEC is published and updated every three years to stay on top of the ever changing needs of the consumer and industry while providing the latest rules and guidelines for safe electrical installations.

Please be advised that in addition to the “National Electrical Code” some towns, cities and states have their own electrical codes that must be followed.  It is a good idea to contact your local building department to see what codes are in effect.  In many cases other codes may be applicable to electrical installations such as a fire code, energy code, sound code, building code etc.

Non metallic electrical cable with staples through the outer insulation sheath
Non metallic electrical cable with staples through the outer insulation sheath

The non-metallic jacketed cable depicted above was securely fastened to the joists.  However the staples went through the cable instead of around it and that created a short circuit which tripped the circuit breaker off.

Not considering the safety of your actions. Working with electricity and wiring can be hazardous to your health.  At the very least goggles, gloves, and a disposable dust mask should be part of your tool box.  Good high back work shoes with steel toes are what many construction workers wear on their feet for comfort and protection.  You should consider the same.  Consult OSHA Publication #1926 for the guidelines for safety in the construction industry.

In addition it is most likely that the wiring that you install will be used by others. It is important to ensure their safety with a minimal of risk by following the building codes during installation.

Light bulb socket with exposed electrical terminals
Light bulb socket with exposed electrical terminals

The light bulb socket in a low ceiling basement above was found plugged into a switch controlled light socket with a screw in adaptor.  The wire was lamp cord which is not rated for a permanent installation and the live screw terminals were exposed and loose!  I removed this.

A better installation for a simple light would be using approved cable such as Romex or BX and an electrical box with a keyless light socket.

Not getting an electrical permit or having your electrical installation inspected.   There are a few arguments for NOT getting a permit or having an inspection performed such as government infringing on the rights of individuals or refusing to pay the cost of the permit and inspection.  SAFETY is paramount and quashes all arguments against permits.

If you are a non-professional doing an electrical installation in your home, you need confirmation that the work is done in a safe and workmanlike manner.  The safety and well being of you, your family, and your home are at stake.  Doing the job right includes a permit and inspection by your local building department or whatever authority has jurisdiction on home improvement in your community.

Sometimes owners in a community have an additional authority such as a homeowners association or management company that must be consulted before any work is performed.

Porcelain keyless light socket hanging by wires without an electrical box
Porcelain keyless light socket hanging by wires without an electrical box

Someone wanted a wall switch for this light socket so they fished some lamp cord into the ceiling and connected it to a switch.  The socket was screwed directly to the drywall ceiling.  There was no octagonal electrical box.  In addition, the conductor that was switched was the neutral, not the hot as required.

Using undersized electrical switch and outlet boxes to accommodate an abundance of wires.  As described in the National Electrical Code, a certain volume of space is required in electrical boxes for each electrical conductor.  The required amount varies according to the size wire being used and if any wiring devices such as switches and outlets are installed in the box as well.

Consult article 314 and table 314.16(A) and table 314.16(B) in the  “National Electrical Code” (NFPA 70) for more information.

Cutting the wires in outlet, switch and junction boxes too short.  Conductors should be long enough to extend past the outside edge of the box at least three inches.  Read article 300.14.  Longer conductors make it easier to work on them.  If there is not enough room to push the wires into the box comfortably then you may need a bigger box.

Not grounding metal boxes properly.  Anything metal that carries electrical conductors or contains wiring devices must be grounded.  If you are using type NM-B cable it contains a separate bare copper grounding conductor.  This must be secured to a metal box using a separate machine screw.

Type AC cable (BX) has a metal armor around the wires for protection.  That metal armor is also the grounding conductor for BX cable.  To ensure continuity of ground the proper connectors must be used and installed wrench tight.

A cover screw or a screw that secures the box to a wall or ceiling cannot be used to attach the grounding conductor.  All metal boxes have a tapped hole for a 10/32 screw (#10 machine screw with 32 threads per inch).  Use that hole and a 10/32 green grounding screw to ground the box.  Read section VI in Article 250.

Metal armored cables improperly terminated and not grounded in a metal outlet box
Metal armored cables improperly terminated and not grounded in a metal outlet box

There were several electrical outlets in this room wired like the one above.  The BX armored cable was not cut cleanly nor did it have any bushings.  Consequently the armor created a short circuit when it cut into the hot wire.

In addition, there wasn’t a good ground connection because a clamp or connector was not use to secure the cable armor tightly to the box.  Below is the solution.

Armored cable with bushing entering the bottom of a metal outlet box before insertion into the wall
Armored cable with bushing entering the bottom of a metal outlet box before insertion into the wall

The armored cables above were trimmed back using my BX cutting pliers and anti-short bushings were inserted into the cable.  A clamp inside of the box will lock the cables in place ensuring ground continuity.

For ease of installation it is better to leave the BX armor out of the box a little until the outlet box is pushed into the wall.  Then the wires are pulled into the box and the cable armor comes into the clamp and is tightened.  The cable armor must be in tight contact with the metal box to ensure grounding continuity.

Not locating underground utilities before you dig. Call 811 to arrange to have a mark down of all of your underground utilities for FREE before you dig anywhere on your property.

811 is a national hot line that will contact all of your local utility companies and arrange for them to come out and locate and mark where your water, gas, electric, telephone and cable TV services are located.

Using an extension cord for permanent wiring. Different types of wires and cables are approved for various purposes.  Cords that are approved for portable and temporary use are not to be used as permanently installed wiring.

The insulation has different properties and characteristics that make it unsuitable for long term installed use.  In some instances the insulation will eventually dry out and break off exposing the bare copper conductors. Read articles 310, 400.7 and 400.8 in the “National Electrical Code” (NFPA 70).

Wires attached directly on to the prongs of a plug
Wires attached directly on to the prongs of a plug

Instead of installing an electrical outlet, someone decided to connect a Romex cable directly to a plug in the photo above.  This was covered in several layers of electrical tape when I found it.

Using NM-B cable underground.  You must use cable and wire rated and labeled for underground use even if it is in conduit.  Moisture still condenses inside of an underground conduit and can cause problems leading to failure of the cable.

Do not use NM-B in the ground directly or in a conduit buried in the ground.  Use type UF cable for direct burial underground wiring or THWN conductors inside of a conduit that is buried underground. Article 334 covers NM-B cable and UF cable is under Article 340.

Wiring under-cabinet lights wrong.  A common type of under-cabinet light that is sold in retail stores has a lamp cord with a plug already attached to the fixture.  It is only safe to use that light by plugging it into an electrical wall receptacle.

It is not safe to cut the plug off and install the lamp cord into the wall and control the under-cabinet light using a wall switch.

The proper method is to have an electrical receptacle controlled by a wall switch or use under-cabinet light fixtures that are approved to be hard wired directly.  These can be purchased at a lighting store or an electrical supply company.  There are also low voltage options for under-cabinet lighting which have less stringent code requirements for wiring.

Splicing wires together without a junction box. I see this a lot.  Two or more cables are spliced together using wirenuts, usually, but there is no junction box.  The wires are just hanging out, sometimes in an attic, other times in the basement.

Wires must be spliced inside of a junction box.  See article 314 in the “National Electrical Code” (NFPA 70) to determine the correct size junction box based on the number and size of conductors that you plan on splicing.

Wires connected above a ceiling with no required junction box is clearly an electrical code violation
Wires connected above a ceiling with no required junction box is clearly an electrical code violation

Calling an electrician to install wiring AFTER you have painted and decorated.  This isn’t really a code or safety violation, but it is a very good idea.  Wiring needs to be installed inside of the walls and ceilings.

Sometimes holes need to be made in the walls and ceiling to install wiring for receptacles, switches and light fixtures.  Call an electrician BEFORE you do any painting and decorating if you plan to have lighting, outlets and switches installed.  Form follows function.

Basement light fixture wired wrong through electrical outlet
Basement light fixture wired wrong through electrical outlet

The plug on the factory installed short cord connected to the above hanging fluorescent light fixture was cut off and the wire was connected directly inside of the outlet box.

The green arrow points to the grounding conductor from the Romex cable.  It was never connected and instead just doubled back out the connector.  The BX cable was hanging in the air with no staples or other kind of support.