WordPress Plugin Receive a Link

You could, feasibly, do it with a custom field, ignoring ajax. You could store the ratings of each one in an array in the field. The star rating would be generated something like this:

//note this is untested and provided as a guide not gospel
$ratings = get_post_meta($post_ID,'star_ratings');
$total = 0;
foreach($ratings as $rating) {
    $total = $total + $rating;
}
$star_rating = $total/count($ratings);

Then all you need to do is manipulate that.

To store it you just append the new users rating to the array.

To do it with php, you would need to refresh the page to both add the rating and display the new one which could trip the page and/or user out.

EDIT

To place it on the page using a php/jquery update method you could use this:

<div id="ratings">
    <?php
    for($i = 1; $i <= 5; $++) {
        echo '<a class="star" name="'.$i.'">'.$i.'</a>';
    }
    ?>
</div>

And then amalgmate something out of https://stackoverflow.com/questions/4798001/insert-into-mysql-database-with-jquery-and-php to get a form to submit.