I've got 20 people with full beds, and a couple brahmin in there, three shops, crops, and artillery. I think I could fit 30 without much extra work, I'd just have to be more efficient with bed placement. The biggest problem I've found is that attackers spawn inside the settlement boundary no matter how good your walls are, but fortunately they only spawn at ground level.
Advice:
Build a series of ladders until you can't build any higher, then build out to the walls in every direction with the "shack second story" and fill in the edges with the small floor tiles, treat that as your roof, and build levels down from there. Frequently you can get small floor tiles to clip into the buildings if you're willing to take the time to finesse it. You can fit two stories in easily that take up almost the entire area of the alley minus the tricky clipping bits around the edges, with more than enough room for everything required, and leave the ground floor as a free fire zone with turrets facing inwards. For stairs that you have to share with settlers regularly, don't use the prefab two story floor tile, use two of the long wide stair sections side by side, settlers are bad at stairs. My fast travel point and sleeping bag is on the roof of the structure that had the weapon bench in it originally. The junk house that you can't scrap makes a decent landing pad as well, I just didn't like it. I put scavenging stations in it until I realized that settlers assigned to scavenge move around constantly within the settlement, and that means more clutter when you need to move through it or fight in it.
Raiders and gunners tend to spawn inside the short leg of the "L" shape (where you find the chained door, which just leads to the street). I put my crops there because they're the cheapest items to repair, and turrets around the edges out of melee reach. Supermutants tend to spawn at the top of the long leg of the "L" (just outside the unchained front gate), so I've got turrets on my second and third floor facing out over the "front door". I left the back door chained (not that teleporting raiders care) and blocked up the gap at the short end of the "L" with foundation blocks.