Getting problem in Adaptive Residual based FreeFem++ code of Poisson equation from FreeFem++ doccumentation

Dear all expert and respected professors, i am wondering why the following adaptive FF++ codes of Poisson equation which i have just taken from the following tutorial of FreeFem++ documentation does not giving good order of convergence with a very simple test problem.

( Metric Adaptation and residual error indicator for P2 and Adaptation using residual error indicator for P1)

Here, all the codes:
Poisson_P1-adapt.edp (4.9 KB)
Poisson_adapt_P1_with_Dx.edp (3.9 KB)
Poisson-P2_adapt.edp (3.2 KB)
Poisson_adapt_P1_with_Dx.edp (3.9 KB)

I am not getting where i am doing mistakes!. I will be very grateful if i get any suggestions regarding this.

Thanks in advance!.