It should not be for loose gas connection. In this case all of your welds would have same problem. First check wind blowing in the welding area; and second check your gas regulator. Loose wire feed rollers not to let wire come out of contact tube; then for a while, check that gas comes evenly or not.
I would start with the easiest and cheapest solutions first. Yes it could be a loose wire to the solenoid, and it is easy to check; but that is not the usual problem that I run into.
Inconsistent problems are the hardest to solve. It's hard for anyone to say what is causing your porosity without being there but I would start by checking all of your basics because most problems are caused by straying from them. Sometimes the variables are just on the edge of trouble so that you don't have a consistent problem, nor see a clear cause.
Gas flow rate, loose hose connections, gun held at the wrong angle, gun held too far away, wind or draft, voltage too high for what you are doing, dirt or oil in the weld joint, water in the joint, water or oil on the roll of wire, etc.
Generally, gas solenoids are pretty reliable but they can stick closed or open after a delay. Also, be sure no one used WD-40 (or similar) on the equipment.
You didn't say if you are using flux-cored wire. Sometimes you can get a defective roll, but usually the other items I mentioned are the cause.
Good luck with it.
Chet