It depends. If it’s a small gathering, and you can trust your child will be gracious and polite, go ahead and open the presents. However, if you have five or more kids at the party, waiting until the event is finished might be best.
Your child can open presents in a relaxed environment after the guests leave, writing thank-you-cards as they go, which they can deliver the following day. Opening lots of presents in front of guests can be overwhelming for the host and the other kids.