I think you would end up adding code above like:
<?php
$dimensions = DFP_getImageDimensions($_FILES["ImageAside"]);
?>
doing:
$WAFV_Errors .= WAValidateNM((!empty($_FILES["ImageAside"]["name"])?$dimensions['width']:"") . "",700,700,"",",.",false,5);
$WAFV_Errors .= WAValidateNM((!empty($_FILES["ImageAside"]["name"])?$dimensions['height']:"") . "",380,380,"",",.",false,6);