On the rate of convergence of the Metropolis algorithm and the Gibbs sampler by geometric bounds