Mobile_Detect是否过度杀伤?

I use Mobile_Detect to redirect users to a mobile version if their device is either a mobile phone or tablet. I've reduced and minified the file from 72Kb down to 36Kb, but now wonder... Is Mobile_Detect overkill to detect the user's device type? Is there a way (with less overhead) to accurately detect the basic device type using php? If so, how?

//current code

<?php

require 'Mobile_Detect.php';
$detect = new Mobile_Detect;
if($detect->isMobile() || $detect->isTablet()){header("");}

?>