Could even just be a misadjusted TPS.
Use a volt meter set to DC volts
Use sewing pins to pierce top and center wires so you can test voltage
Turn on key
Put meter's black probe on a Ground
Touch Red probe to top wire pin, should read 5volts(4.7-5.0v), if it doesn't then you found the problem, this voltage is the Reference voltage, so no need to test anything else if this is wrong.
If you have 5volts then test center wire, should read .7 to .9volts(under 1volt), if it is higher or lower loosen the TPS screws and turn sensor.
If it won't get to the proper range look at the throttle linkage, you will see a screw, it "looks like an idle screw", it isn't, it is to adjust TPS and prevent dieseling(run on).
Adjust the screw to get proper closed throttle voltage on TPS.
Now slowly open TPS and watch center wire voltage, it should go up steadily, no jumping around, at wide open throttle you should see above 4.5volts.