plan B pill

So I had unprotected sex last night. He didn't finish inside of me but should I still take a plan B pill???
Also, if I do take it what are the side effects?! I'm supposed to be getting my period in the next 3-4 days. Will it effect it?!