The trend seems to be the longer the better in shotguns these days but does that still apply to the smaller gauges?
For trap and skeet, and turkey or goose hunting a long barrel is preferred to keep the shot pattern dense as long as possible.
I know a guy who shoots a 26" 870 with the Full Rem Choke in it, and the last year he shot, he was higher in the club top ten than I was.
Upland game in heavy cover (Grouse,Woodcock, Quail), skeet, 26”. Pheasant, sporting clays, Rabbit, 28”. All else longest barrel length offered. IMHO.