Puttering/Stalling - Fluctuating RPMs

2000 Nissan Xterra 2x4. 185,000 miles. I recently took the car to the mechanic a couple of days ago and had the IACV/TPS sensor replaced. Afterwards I had to tighten the throttle cable because of a grinding noise. Now the car putters slightly, then it seems to come close to stalling. This occurs while idling, while parked and at red lights, as well when driving. While in motion the car shudders and shakes slightly, as if on a bumpy road, but its fresh pavement. While these symptoms occur the RPMs (avg=900rpms) fluctuate; spiking to nearly 2,000rpms then plummeting to 3-400rpms. Notes: (1) I found that the wire coupling on the distributor was broken (Probably Mechanic). However, the metal prongs for the coupling seem intact (Picture). (2) Not original distributor (from Cardone Select), I do have the original though. (3) Spark plug wires are original (old) except for 1. (4) Spark plugs are a bit old, not that old though I think. (5) It occurs more often during the cold, snow, and rain. Any and all suggestions are greatly appreciated. Thank you.

I’d say that broken connector is suspect no matter what. Its not a question of whether those prongs are in good condition. Its a question of having that housing intact to protect them from the elements - such as moisture.

Is there a check engine light involved? Why did you have the IACV & TPS replaced?