A theoretical question, if 2 cabinets have the same volume eg 40L both the same height, and one cabinet is deep with a narrow baffle, and the other is shallow with a wide baffle - how does this affect the sound?
Well the baffle would surely effect the sound If you are replicating an existing design dont change the height and baffle. The depth is usually safe to change unless it is rear ported and even this is only a concern with wall proximity.
Of the two, the cabinet with the more narrow width has a higher baffle step frequency and apparently does a better job at projecting a stereo image. I'm not sure exactly how narrow of a width is narrow enough to improve imaging, and this is something that is generally agreed to on the basis of listening, in other words, a purely subjective judgement.
As already stated, narrower will reuslt in a higher baffle step frequency (see here for more info --> Baffle Step Compensation) . Another advantage to narrow and deep, as opposed to shallow and wide is that you are less likely to get rear wall reflections coming back through the cone with a deep cabinet. Narrow cabinets also tend to have better WAF