Blue smoke is from oil burning, usually from worn rings.
The remedy to cure the visual smoke test is to run a very rich mixture of thick oil, like 80 or 90 weight gear oil, or motor honey. My tailpipe smoked badly due to worn rings but passed emissions. 8 of 8 mechanics I spoke with wanted me to replace the engine. When I drained the oil and put in 5 bottles of STP oil treatment, the smoke was GONE. It passed all the smog tests. I went back and showed this to 3 of the 8 mechanics. They already knew it would work but were too corrupt to tell me. They really wanted me to buy a new motor (crooks). Perhaps fewer bottles of STP could have been mixed with some regular oil, but I used pure STP to be sure. Regular STP oil treatment in the blue bottle is thicker than STP in the red bottle for 4 cylinder engines.
Synthetic oil is supposed to be smokeless but is too thin and slippery to cushion the rings so it still smoked. Heavy gummy oil will seal worn rings and pass visual smoke tests.
Another tip. Retarding the ignition timing will reduce emissions and help it pass. Minus three degrees TDC with the computer wire disconnected is still within specs. A timing light can be purchased at Harbor Freight for $12. Some distributor caps require a special tool to loosen the bolt to adjust the timing. The tool is about $8 at most any auto parts store.
Vacuum leaks will make the car idle fast.
Premium gas is better to run during the test.
The motor should be warmed up well first before the test.
If you read the fine print on G2P - Guaranteed to Pass fuel additive you'll see that you'll never ever be able to collect on their double your money back guarantee when your car fails. Don't buy it.
The emissions test has two categories: hydro carbons, and oxides. EGR hardware is related to the oxides test. Spark plugs, wires, ignition timing, etc., are related to the hydro carbons.
Mechanics often want to replace the O2 sensor without a valid reason. Watch out.
It took me only a few minute to replace mine but 'the book' authorizes mechanics to charge 0.9 hours at the shop rate. Ouch.
Some smog stations that offer internet coupons are known to sabotage your vehicle by pulling off a vacuum hose then failing it for being 'tampered' with. There is no way in a million years that a vacuum hose will just fall off by itself because the vacuum sucks it on there. The coupon savings that brought you there is offset by the additional retest fee. It's a scam. The guy at Saticoy/Winnetka pulled this dirty trick on me. I know this for sure because checked everything right before I took it to him. That hose was indeed on there when I took it to him, for sure.
After making timing adjustments or replacing various sensors It is a good idea to reset the cars computer by disconnecting the battery for a minute. This causes the computer to recalibrate itself the next tim the engine is started.
When the vehicle is cold, reach under it with a HAMMER and bang on the CATALYTIC CONVERTER, careful not to dent it, but hard enough to knock the carbon buildup off the platinum catalyst plates inside. Then start the car and rev on the gas to blow the carbon out. Repeat steps a few times and that will drastically improve your emissions test.
Never take a car that needs a little work to a mechanic who needs a little work.