Based on How to make a pie chart in CSS and https://www.w3schools.com/css//css3_gradients_conic.asp, here is a solution that should work for you.
First, calculate at how many degrees the various parts of the piechart need to start and end.
$pass=20
$fail=5
$reject=2
$total=$pass + $fail + $reject
$deg=360 / $total
$degpass = $deg * $pass
$degfail = $deg * $fail + $degpass
And now the HTML code for the pie chart the with the variables infused
<div style='width:100px; height:100px; border-radius:50%; background-image: conic-gradient(green ${degpass}deg, red ${degpass}deg, red ${degfail}deg, black ${degfail}deg);'></div>
of course you can then also add the text next to it.
<p>Pass: $pass</p>
<p>Fail: $fail</p>
<p>Reject: $reject</p>
Here is what the result should look like in your example:
<div style='width:100px; height:100px; border-radius:50%; background-image: conic-gradient(green 267deg, red 267deg, red 334deg, black 334deg);'></div>
<p>Pass: 20</p>
<p>Fail: 5</p>
<p>Reject: 2</p>
Any further stylistic improvements are just more HTML/CSS changes, not PS specific ones.