A limit switch is no good if we can't attach wires to it. Make sure there is room for a wire and crimped-on connector. And there needs to be room to install and remove that connector.
Most limit switches use narrow connectors which are more difficult to get than the standard too-wide connectors. Using the correct size is important for fit and securely holding it in place.