Is it plausible to forget the cockpit unlocking code?
The code would also be shared among the purser and/ or the other flight attendants, so the answer is no. I believe however that they tend to keep the same code for a few days within the same crew to make remembering it easier.