The sentence “ I was wondering if you had locked the door?” is not asking for a favour because you are asking them if they had locked the door. Meaning you are not really asking him to lock the door, you are just seeing if the person has locked it.
The other two would be favours though, if you want to make them more assertive, remove I was just wondering and say can you or could you.