Cook things you have done before (successfully). Don't be tempted to cook something new for an impressive dinner party. There are far too many things that could go wrong and, even if it does all work out well, you will be under stress and not enjoying it.
So, cook things you have managed at least once before - practice on yourself, or at least on very close company who will not mind if dinner late, or burnt! It's OK to scale up a recipe for a larger number, but you want to be able to relax and enjoy the company.
Selecting your guests. This is of course a matter of personal taste, not to mention what your objectives are! You could be more relaxed in the timing and seating if everyone is a close friend; if you are out to impress someone, then a little more formality may be called for.
If at all possible, get firm acceptances, so you are sure exactly how many people you are feeding, and how many places to lay at the table. Don't invite more than you can comfortably seat around a single table - or the closest approximation you can manage. And specify clearly an arrival time with the invitation, so that the food can be properly cooked at the right time.
Make sure you invite at least one close friend to act as an assistant host while you are slaving away in the kitchen.