Consuela G.’s question answered:
That metal plate covers the external lavatory door opening and closing mechanism.
It lifts a spring mechanism by pulling the plate up with your finger.
It serves two purposes:
Procedures require a flight attendant to lock the lavatory doors for takeoff and landing.
That prevents passengers from going in there during critical phases of flight when everybody is required to remain seated with the seat belt fastened..
It also functions as a means for the flight attendants to enter a locked restroom door anytime, to i.e. go in and assist a person who may need help for any reason after locking the lavatory door.
Each lavatory has a flight attendant call button for assistance if needed.