They 100% swab your feet and inside of the shoe for drugs.
Hands and close personal items, such as wallets and electronics are for multiple reasons. Including explosives.
The machine they put the swabs in can detect multiple substances, explosive compounds, precursors, drugs.
They don't care if you got traces of drugs in your system. But they do care about you trying to smuggle it. That's why they test for Traces, externally and internally.