You can remove posts with ‘page’ type directly from SQL query.
Add this:
AND post_type = ‘post’
on line 1938. You’ll get something like this:
function get_top_ranked_posts($limit) {
global $wpdb;
$temp = $wpdb;
$join = apply_filters('posts_join', '');
$where = apply_filters('posts_where', '');
$groupby = apply_filters('posts_groupby', '');
if (!empty($groupby)) {
$groupby = ' GROUP BY '.$groupby;
}
else {
$groupby = ' GROUP BY '.$wpdb->posts.'.ID ';
}
$posts = $wpdb->get_results("
SELECT ID, post_title
FROM $wpdb->posts
LEFT JOIN $wpdb->ak_popularity pop
ON $wpdb->posts.ID = pop.post_id
$join
WHERE post_status = 'publish'
AND post_date < NOW()
AND post_type = 'post'
$where
$groupby
ORDER BY pop.total DESC
LIMIT ".intval($limit)
);
Personally I use akpc_most_popular() function to get popular posts. And it transitively calls get_top_ranked_posts().