Over the last decades, numerous distributed consensus-based algorithms have found a wide application as a complementary mechanism for data aggregation in wireless sensor networks. In this paper, we provide an analysis of the generalized Metropolis-Hastings algorithm for data aggregation with a fully-distributed stopping criterion. The goal of the implemented stopping criterion is to effectively bound the algorithm execution over wireless sensor networks. In this paper, we analyze and compare the performance of the mentioned algorithm with various mixing parameters for distributed averaging, for distributed summing, and for distributed graph order estimation. The algorithm is examined under different configurations of the implemented stopping criterion over random geometric graphs by applying two metrics, namely the mean square error and the number of the iterations for the consensus. The goal of this paper is to examine the applicability of the analyzed algorithm with the stopping criterion to estimating the investigated aggregate functions in wireless sensor networks. In addition, the performance of the algorithm is compared to the average consensus algorithm bounded by the same stopping criterion.