It is important for a woman alone in a hotel room to ensure that no person can enter her room without her permission especially when she is in the room. Usually the hotel housekeeping staff will knock on the door when they come to do the housekeeping work.
There is usually a double locking provision in a hotel room, allowing the person in the room to latch the door from inside, so that it cannot be opened from outside. However there may not be a top latch in the room which is an additional safety feature.
There is always a possibility that electronic access system can be hacked for a person to enter the room, so hotel rooms without a mechanical latch are not very safe for single women staying alone