Adjusted percentage calculations to only be performed if the divisor is ...

...not 0 clearing PHP Warning error in Apache error_log

Encountering PHP Warnings for "Division by zero" on each page refresh of index.php in /var/log/httpd/error_log

By not performing the calculation when the divisor is 0, the warning is avoided.