When you port a cabinet essentially what your doing is bumping frequency. As others already mentioned, the size of the hole, and the length of the port changes the frequency. There is a lot of physics involved in knowing how the speaker will react in the box. Also, the size of the box makes a huge difference. So the theil and small parameters, port size and length, and box size all have an effect on the sound. A sealed enclosure will generally give you the flattest response. Ports are usually best used on subwoofers to amplify specific frequencies. Think of the speaker as a spring, and the amount of air inside the box as a cushion. The size of the box determines how much air is within the box and gives it back pressure. The smaller the box, the harder the speaker has to push against the air, making it harder to move. Which is why a larger box sounds deeper. Of course the type of wood and thickness of the wood also changes the sound. Generally you want the stiffest walls you can get, (at the expense of throwing out your back when it comes time to transport it).
My advice for guitar is to stick with sealed boxes, they sound better, and have a flatter frequency response, and if the speaker manufacture gives box enclosure specs, go by those, and only vary a few degrees.