Walls are completely useless in the calculation, though practical with on site events. They do not get attacked very often, because I do not store excess resources to settlement Workshops. That calculation actually favors settlers, so I rarely ever bother to run, if one of my settlements happens to get attacked.
Game only calculates 100 points for defense in to attack chance and victory calculation. There is a small base change for raids, which is increased by the amounts of excess food and water in your Workshop.