Uncertain data and undesirable outputs are two challenging issues in traditional data envelopment analysis (DEA) models while dealing with the environmental efficiency estimation of decision-making units (DMUs). This study considers Stackelberg and the centralized game theory approach in a two-stage DEA model for evaluating DMUs in the presence of uncertainty and undesirable outputs simultaneously. To tackle the uncertainty, we apply the p-robust technique and assume that undesirable outputs are weakly disposable. The proposed fractional models are linearized using the Charnes and Cooper transformation. We utilize the new models for a real dataset drawn from 11 oil generation ports in the Persian Gulf region consisting of two stages: an oil production stage and a wastewater treatment stage. The results revealed that the managers should take different strategies in environmental efficiency evaluation including undesirable impacts and also efficiency improvement in increasing oil generation. Further, the empirical results showed that the stochastic p-robust approach for controlling the conservatism level leads to a more conservative solution, and policymakers could recognize the significant steps that should be followed to improve each oil generation unit's environmental performance. Also, to show the reliability and accuracy of the results and the effect of the decision-maker's preference, a detailed sensitivity analysis is performed.