If you are using an old theme that does not support the WordPress Site Editor, the recommended way to do this is to create a child theme and create/modify the single.php and page.php files.
If you want to use your functions.php file, you could also do something like this:
function glsr_add_review_form_to_posts_and_pages ($content) {
global $post;
if (!$post instanceof \WP_Post) {
return $content;
}
switch ($post->post_type) {
case 'post':
case 'page':
return $content.'[site_reviews_form assigned_posts="post_id"]';
default:
return $content;
}
}
add_filter('the_content', 'glsr_add_review_form_to_posts_and_pages');