how to write structured data for reviews and rating in wordpress

This is my code:

<div class=“singlerating”><?php (get_average_ratings($post->ID))?movie_grade(get_average_ratings($post->ID)):‘Not available’; ?> <span><?php comments_popup_link(‘Leave a comment’, ‘1 comment’, ‘% comments’, ‘comments-link’, ‘Comments disabled’); ?></span></div>
</div>

Thank you.

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now in the Project Development Help and Advice board. No action is needed on your part; you can continue the conversation as normal here.