diff --git a/src/wp-admin/menu.php b/src/wp-admin/menu.php
index d04fd3c12f..64f80190cf 100644
--- a/src/wp-admin/menu.php
+++ b/src/wp-admin/menu.php
@@ -67,10 +67,21 @@ $menu[15] = array( __('Links'), 'manage_links', 'link-manager.php', '', 'menu-to
// $menu[20] = Pages
-$awaiting_mod = wp_count_comments();
-$awaiting_mod = $awaiting_mod->moderated;
-$menu[25] = array( sprintf( __('Comments %s'), "" . number_format_i18n($awaiting_mod) . "" ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'dashicons-admin-comments' );
-unset($awaiting_mod);
+// Avoid the comment count query for users who cannot edit_posts.
+if ( current_user_can( 'edit_posts' ) ) {
+ $awaiting_mod = wp_count_comments();
+ $awaiting_mod = $awaiting_mod->moderated;
+ $menu[25] = array(
+ sprintf( __( 'Comments %s' ), '' . number_format_i18n( $awaiting_mod ) . '' ),
+ 'edit_posts',
+ 'edit-comments.php',
+ '',
+ 'menu-top menu-icon-comments',
+ 'menu-comments',
+ 'dashicons-admin-comments',
+ );
+ unset( $awaiting_mod );
+}
$submenu[ 'edit-comments.php' ][0] = array( __('All Comments'), 'edit_posts', 'edit-comments.php' );