b16 idle problem

having trouble with my idle.it would idle very low when at a stop fells like its about to stall out and suddenly it will surge up and go back to normal..this all happen a week after valve adjustment then the car would run rich and blow out black smoke but when the check engine lite came on it would run smooth which was CEL 1 primary o2..got the valve adjustmnet done again and i was told that the last person who did the adjustment made it tight but only by a fraction of a tiny bit..the idle problem went away car ran nice but later on came back then check engine light came on for CEL 1 again o2 sensor the car run nice..took off the o2 sensor it was black covered up with carbon and i run my car like this for almost 6 months..i decided to leave the o2 sensor unplug and it runs and drive smooth without idle problem better trothle respond and less bogging..im thinking my o2 sensor is dead but was told it could be the tps..so now im debating whether i buy an o2 sensor or the tps..which one would most likely fail? dont wanna be disappointed to find out the problem still exist after spending money..wasnt the first time it happen but trying to stay away from it..any suggesttion
the motor is a jdm b16 sir2
the motor is a jdm b16 sir2