Kicked Out - S4-E12
Plot hole: Malcolm mentions how his parents would flip if they knew he was still dating his lying girlfriend. But in the episode before (while in the car with Lois, at the end) he mentions how his girlfriend has him guessing what she wants to do. The way he says it, makes it known that he is still dating her. He says it in present tense. Therefore, they already know for sure, from his own mouth.
Answer: Francis is only allowed to talk on the phone at school for three minutes a day. I think the code gives him free access to talk to his girlfriend.