Automatically Set Featured Image

<?php
function autoset_featured() {
          global $post;
          $already_has_thumb = has_post_thumbnail($post->ID);
              if (!$already_has_thumb)  {
              $attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" );
                          if ($attached_image) {
                                foreach ($attached_image as $attachment_id => $attachment) {
                                set_post_thumbnail($post->ID, $attachment_id);
                                }
                           }
                        }
      }
add_action('the_post', 'autoset_featured');
add_action('save_post', 'autoset_featured');
add_action('draft_to_publish', 'autoset_featured');
add_action('new_to_publish', 'autoset_featured');
add_action('pending_to_publish', 'autoset_featured');
add_action('future_to_publish', 'autoset_featured');
?>

Change The Set Featured Image Text

You canĀ  change “Set post thumbnail image” text

function change_featured_image_text( $content ) {
    return $content = str_replace( __( 'Set featured image' ), __( 'Set post thumbnail image' ), $content);
}
add_filter( 'admin_post_thumbnail_html', 'change_featured_image_text' );

Restrict Admin Area To Only Admin Users

function restrict_admin()
{
	if ( ! current_user_can( 'manage_options' ) ) {
                wp_redirect( site_url() );
                exit;
	}
}
add_action( 'admin_init', 'restrict_admin', 1 );

Or
Only Allow Admins Into The Admin Area:

function admin_login_redirect( $redirect_to, $request, $user )
{
    global $user;
    if( isset( $user->roles ) && is_array( $user->roles ) ) {
        if( in_array( "administrator", $user->roles ) ) {
            return $redirect_to;
        } else {
            return home_url();
        }
    }
    else 
    {
        return $redirect_to;
    }
}
add_filter("login_redirect", "admin_login_redirect", 10, 3);

Set Minimal Comment Limit

add_filter( 'preprocess_comment', 'minimal_comment_length' );

function minimal_comment_length( $commentdata ) {
	$minimalCommentLength = 20;

	if ( strlen( trim( $commentdata['comment_content'] ) ) < $minimalCommentLength ) 
        {
		wp_die( 'All comments must be at least ' . $minimalCommentLength . ' characters long.' );
        }
	return $commentdata;
}

Automatically Link Twitter Usernames In Content

function content_twitter_mention($content) {
	return preg_replace('/([^a-zA-Z0-9-_&])@([0-9a-zA-Z_]+)/', "$1<a href=\"http://twitter.com/$2\" target=\"_blank\" rel=\"nofollow\">@$2</a>", $content);
}

add_filter('the_content', 'content_twitter_mention');
add_filter('comment_text', 'content_twitter_mention');

Uses:
Really just add function and use @twitter_username that’s enough test now.