<?php
function prevent_subscriber_access(){
if( current_user_can( 'subscriber' ) && is_admin() ) {
// do something here. maybe redirect to homepage
wp_safe_redirect( get_bloginfo( 'url' ) );
}
}
add_action( 'admin_init', 'prevent_subscriber_access' );
?>