Hello Sir,
I have checked the attached php file and also checked the if statement you stated here. Looking at the code in the file I am sure this shipping method can be disabled by using something similar like that if statement based on one of the product's weight exceeding 50kg.
Please contact, I have done similar tasks in past, and with some debugging and my past experience, I will be able to do this perfectly within your budget.