Заменить
<div class="rating-box-top">
<div class="rating-container-top">
<svg class="ex-star<?php if ($ex_key < 5) { ?>
ex-star-grey<?php } ?>
">
<use xlink:href="#ex-star"></use>
</svg>
<svg class="ex-star<?php if ($ex_key < 4) { ?>
ex-star-grey<?php } ?>
">
<use xlink:href="#ex-star"></use>
</svg>
<svg class="ex-star<?php if ($ex_key < 3) { ?>
ex-star-grey<?php } ?>
">
<use xlink:href="#ex-star"></use>
</svg>
<svg class="ex-star<?php if ($ex_key < 2) { ?>
ex-star-grey<?php } ?>
">
<use xlink:href="#ex-star"></use>
</svg>
<svg class="ex-star<?php if ($ex_key < 1) { ?>
ex-star-grey<?php } ?>
">
<use xlink:href="#ex-star"></use>
</svg>
</div>
<div class="product-reviews-rating-line">
<span class="product-reviews-rating-line-value" style="width: <?php echo $ex_raiting_stat['raiting']; ?>%;"></span>
</div>
<div class="product-reviews-rating-value text-center"><?php echo $ex_raiting_stat['sum']; ?></div>
</div>
На
<div class="rating-box-top">
<div class="rating-container-top">
<?php echo $ex_key; ?>
</div>
<div class="product-reviews-rating-line">
<span class="product-reviews-rating-line-value" style="width: <?php echo $ex_raiting_stat['raiting']; ?>%;"></span>
</div>
<div class="product-reviews-rating-value text-center"><?php echo $ex_raiting_stat['sum']; ?></div>
</div>
Остальные изменения структурные и сложные, это не 5 минут дела.