Diameter has to do with volume and air speeds. The smaller the pipe the faster the air speed and less volume. Slow moving air wont heat back up as quick as fast moving air. Also when using Larger turbos that can spool as quick as they do now you can encounter surge so having more volume after the turbo can help to prevent this.
As for cooler size the more frontal area the better. Thickness plays a part as well. To thick and you can lose the cooling effect as the air travelling through has heated up prior to actually getting through the core. To thin and it can be restrictive.
At a mimimum I would use a cooler with 2.5" tanks with 2.5" piping. And 50-75mm thick.
Small coolers are not as efficient and after a period they will not be able to transfer air as effectively. To big and you obvioulsy have a larger volume to fill which can result in lag as the turbo has to pump enough air with enough volume to fill and pass through the cooler.