Yeah that would definitely have an effect on it sounding as with the door almost shut would be a lot harder for smoke to travel into the sensor, we also advise to run a Hoover over the outside every month or so as they fill up with dust which can affect them slightly,but at least it's working that's the main thing and I'm sure it would have gone off had you not discovered it so quickly.
You'd be surprised at the amount of people who have them fitted and when you ask them if they work they answer 'think so' then you test it and nothing,battery flat or not even in there! without a battery it's just a lump of plastic on the ceiling, even had some people say they don't need or want a smoke alarm when we ask them if they want a free one fitted.