Sex and Pregnancy

I had unprotected sex almost a week ago but he pulled out and I took and right after I bought the Walmart version of plan B. Just to make sure he didn’t leave any not even a drop in me. Does it work the same ? Should I be worried ?