1997 Nissan 200sx hesitation under load headache!

Hi everyone! I hope y’all can help me solve my issue with my 1997 200 SX SE coupe.
It has the 1.6L engine and is a 5 speed.

I recently purchased this car and it had the CEL or check engine light on.
The part store stated the codes were: P0304 X 2 and P1445.

Here is my problem that occurs mainly once the engine is warmed up- it started bucking and hesitating whenever I push the gas pedal. It doesn’t do it when the engine is cold- at least it is very slight and hard to notice.
On the highway at constant cruising speeds the car rides and purrs great.
While I’m idling at a red light the rpm is constantly dropping about 100 rpm every second.

I have tried the following:
replaced distributor cap. The cap was slightly corroded, IMO
Tested spark plug wires by applying then to metal and looking for spark.
Did a dry compression test and all cyl ranged from 150-160 psi. (Good levels??)
Sprayed carb cleaner around manifold to see if idle changes - nothing

Anyone else have any ideas? Im fairly a novice at mechanics so I’m still learning.
Perhaps the car has stale gas? Not sure how long it has sat, or even if it has been sitting.
bad injector? Bad fuel pump/ filter?

I thank everyone in advance for your wisdom.

Plug wires have a specific resistance per foot and are measured with a multi-meter set to ohms. Since the cap did not look good, I would replace plugs and wires. Cylinder 4 misfire is P0304 and that more than likely a bad plug or wire. the other is a code for your evap system. P1445 Nissan - EVAP Canister Purge Volume Control Valve. Usually the valve is bad, but I would check and make sure all your vacuum hoses are good(not cracked) and attached.

The P1445 is for your evaporative emissions system purge valve circuit. The purge valve sends fuel vapors produced by the gas in your tank into your intake to be burned (rather than venting to the atmosphere). If that valve is malfunctioning it will, at times, act like a vacuum leak - which is consistent with much of what you describe as symptoms.

If you want to verify, find out where the purge valve attaches to the intake (it is often on the throttle body). Temporarily remove the evap line and cap the intake port. If that clear it up then go ahead and sort out what the problem is with the purge valve. It might be the valve. It might be in the wiring. It might be in the system of vacuum lines for the evap system. Visual inspection is always the place to start.

The compression values look good. You got that going for you. Does the spark plug electrode area look different from cyl 4 than 1-3? If not, all the spark plugs look about the same, @cigroller’s comment about the purge valve is where to start I think.

You have a misfire code, cylinder four. Most people do a tune-up as a first step. Replace plugs with NGK brand and plug wire set from the Nissan dealer.

Once the misfire is gone and the car runs normal then deal with the evap canister and vent valve.

Well guys I replaced the spark plug wires and the hesitation is now gone! Now, to work on the emissions code. Thanks for the help!