I am concerned about a newer electrical panel's installation, where one of the older load wires, at the main electrical panel, appear to be shorter in length, appear not reaching the desired circuit breaker's location, as a result, the Electrician elected to Pigtail it to reach its desired circuit breaker. How safe is such practice? Judging by other sub-standard electrical work that I uncovered in the attic, where wire connection are not done inside a junction box and left exposed, I am very concerned about the safety and the level of the finished electrical work. This residential electrical work was completed and approved by the local jurisdiction, building & safety, in the past few week in Southern California.
Pigtails in a panel are fine...
Wire-splicing and pigtailing within a loadcenter cabinet (panel enclosure) is expressly permitted by NEC 312.8(A), and is quite safe (provided the splices are made up properly, of course):
(A) Splices, Taps, and Feed-Through Conductors. The wiring space of enclosures for switches or overcurrent devices shall be permitted for conductors feeding through, spliced, or tapping off to other enclosures, switches, or overcurrent devices where all of the following conditions are met:
(1) The total of all conductors installed at any cross section of the wiring space does not exceed 40 percent of the cross- sectional area of that space.
(2) The total area of all conductors, splices, and taps installed at any cross section of the wiring space does not exceed 75 percent of the cross-sectional area of that space.
(3) A warning label complying with 110.21(B) is applied to the enclosure that identifies the closest disconnecting means for any feed-through conductors.
...but that unenclosed splice job sure isn't!
However, that unenclosed splicing job is a big problem, and a clear violation of NEC 300.15 (none of 300.15(A)-300.15(L) permit anything remotely resembling a flop-a-dop splice job out in the open like this):
300.15 Boxes, Conduit Bodies, or Fittings — Where Required.
A box shall be installed at each outlet and switch point for concealed knob-and-tube wiring.
Fittings and connectors shall be used only with the specific wiring methods for which they are designed and listed.
Where the wiring method is conduit, tubing, Type AC cable, Type MC cable, Type MI cable, nonmetallic-sheathed cable, or other cables, a box or conduit body shall be installed at each conductor splice point, outlet point, switch point, junction point, termination point, or pull point, unless otherwise permitted in 300.15(A) through (L).
Also, that splice needs help anyway
Furthermore, that flop-a-dop splice contains some rather overstuffed wire nuts (7-8 wires into a nut that can only take 6), as well as missing or unhooked ground wires. That should be easy for whoever fixes it to fix, since they'll have to take the whole thing apart to get it boxed in any case, though.
When panels are replaced wires can be pigtailed to connect a circuit to a breaker. The wires you identified in the first picture look like the insulation is frayed where it gets connected to the breaker and I'm surprised they weren't replaced The last two pictures are a disaster. You definitely need junction boxes there. All those cables and flexible metal conduit need to be appropriately connected to junction boxes and the wires connected in the boxes and the boxes covered. I seriously doubt the inspector saw any of this and if the electrician saw this, shame on him for not bringing it to your attention
Pigtailing in the panel
The frayed wire in your inspector's photo should be pigtailed. In fact, expect pigtailing, because your installer appears to have gone crazy with the wire snips and runted off all your wires to just long enough to reach the breaker they're on right now. Some people are mistaken that this leads to a neater panel; what's better is when the hot and neutral wires are long enough to reach any breaker space.
Suppose you add a generator interlock (must be next to main), whole house surge suppressor (preferred near main), and/or large subpanel (preferred near main). Suddenly all your breakers need to move up 2-6 inches, and it'll be pigtail city in there. Fortunately, this is perfectly fine code wise -- not very pretty (which defeats the original goal of "neatness").
Junctions without boxes; oh hell no
Unless your entire attic is a NEMA raceway, I can't even imagine what someone was thinking in the attic. "It's the attic so it doesn't matter"??? Those all have to be inside junction boxes. You might even contemplate a large NEMA box (12" or even longer) or a dogbone of two, say 4-11/16" junction boxes connected by a <24" EMT conduit. All steel, is my recommendation, because that takes care of ground and because it's required to terminate that armored cable/MC. Proper cable clamps on the rest.
The splice next to the vent pipe is particularly hoary; how many white wires are spliced together there!? Eight!?? Wire nuts can't do that! That's a great place for a dogbone; split them into four and four with a jumper between them running through the short conduit.
Seems like the wire is shorter, but judging by the pictures it seems to reach the breaker OK. I don't think there is a problem because one is a bit shorter than the others. I would be more concerned about how old these wires are and in what bad shape the textile insulation is. I think they should be replaced or at least have insulating shrink tubing put over it.
Concerning the other wires floating in thin air in the attic. You are correct. All those should be in junction boxes. I have a hard time believing a licensed electrician was doing that work. You should talk to that company and tell them to fix that.
It always amazes me how creative the trades can be in screwing up. As a Code Enforcement Officer, Building Codes, I was also the Authority Having Jurisdiction. AHJ is the final approval for everything in the building structure. Framing, Insulation, Venting, Plumbing, and yes electrical. I agree with all the electrical comments on code and safety. The open end vent is a long term hazard for moisture and mold damage. In addition creepy crawly things can and will enter the home. Violation! There seems to be cardboard covering something in the last picture, Violation! Inspector needs to be asked, in writing, about why this was not noted and the electricians boss needs a copy of that letter also. Sloppy work to say the least.