It's a pretty horrible hack, but...
Still do it in PHP, but do it by parsing the data out of the text file!
Use PHP to read the file into a string. Since you say the totals appear after the reviews, then just send the string out to the browser.
Then parse the string, looking for all occurrences of <abbr class='rating hide' title='???'>
It shouldn't be too hard to do. You could split the string on "<abbr class='rating hide' title='"
I don't use PHP, but something like:
$txt = ... the full text of all reviews, from the file ...
$ratings = explode( "<abbr class='rating hide' title='", $txt );
$total = 0;
// start at 1 because element 0 will come before the first split point
for ( $r = 1; $r < count($ratings); ++$r )
// if the rating is always 0 through 9, never a 2 digit number, then:
$rating = substr( $ratings[$r], 0, 1 );
$total += $rating;