wordpress shortcode for contact form plugin not working
<p>I made my first WP plugin, it is a contact form - here is the code:</p>

<pre><code>&lt;?php
/*
Plugin Name: Example Contact Form Plugin
Plugin URI: http://example.com
Description: Simple non-bloated WordPress Contact Form
Version: 1.0
Author: Agbonghama Collins
Author URI: http://w3guy.com
*/

function html_form_code() {
    echo '&lt;form action="' . esc_url( $_SERVER['REQUEST_URI'] ) . '" method="post"&gt;';
    echo '&lt;p&gt;';
    echo 'Your Name (required) &lt;br /&gt;';
    echo '&lt;input type="text" name="cf-name" pattern="[a-zA-Z0-9 ]+" value="' . ( isset( $_POST["cf-name"] ) ? esc_attr( $_POST["cf-name"] ) : '' ) . '" size="40" /&gt;';
    echo '&lt;/p&gt;';
    echo '&lt;p&gt;';
    echo 'Your Email (required) &lt;br /&gt;';
    echo '&lt;input type="email" name="cf-email" value="' . ( isset( $_POST["cf-email"] ) ? esc_attr( $_POST["cf-email"] ) : '' ) . '" size="40" /&gt;';
    echo '&lt;/p&gt;';
    echo '&lt;p&gt;';
    echo 'Subject (required) &lt;br /&gt;';
    echo '&lt;input type="text" name="cf-subject" pattern="[a-zA-Z ]+" value="' . ( isset( $_POST["cf-subject"] ) ? esc_attr( $_POST["cf-subject"] ) : '' ) . '" size="40" /&gt;';
    echo '&lt;/p&gt;';
    echo '&lt;p&gt;';
    echo 'Your Message (required) &lt;br /&gt;';
    echo '&lt;textarea rows="10" cols="35" name="cf-message"&gt;' . ( isset( $_POST["cf-message"] ) ? esc_attr( $_POST["cf-message"] ) : '' ) . '&lt;/textarea&gt;';
    echo '&lt;/p&gt;';
    echo '&lt;p&gt;&lt;input type="submit" name="cf-submitted" value="Send"/&gt;&lt;/p&gt;';
    echo '&lt;/form&gt;';
}

function deliver_mail() {

    // if the submit button is clicked, send the email
    if ( isset( $_POST['cf-submitted'] ) ) {

        // sanitize form values
        $name    = sanitize_text_field( $_POST["cf-name"] );
        $email   = sanitize_email( $_POST["cf-email"] );
        $subject = sanitize_text_field( $_POST["cf-subject"] );
        $message = esc_textarea( $_POST["cf-message"] );

        // get the blog administrator's email address
        $to = get_option( 'admin_email' );

        $headers = "From: $name &lt;$email&gt;" . "\r\n";

        // If email has been process for sending, display a success message
        if ( wp_mail( $to, $subject, $message, $headers ) ) {
            echo '&lt;div&gt;';
            echo '&lt;p&gt;Thanks for contacting me, expect a response soon.&lt;/p&gt;';
            echo '&lt;/div&gt;';
        } else {
            echo 'An unexpected error occurred';
        }
    }
}

function cf_shortcode() {
    ob_start();
    deliver_mail();
    html_form_code();

    return ob_get_clean();
}

add_shortcode( 'contact_form', 'cf_shortcode' );
?&gt;
</code></pre>

<p><a href="http://www.sitepoint.com/build-your-own-wordpress-contact-form-plugin-in-5-minutes/" rel="nofollow">This</a> is the tutorial I used to make it.</p>

<p>When I put <code>[contact_form]</code> in a post or on a page, nothing appears...no contact form.</p>

<p>Why won't the form appear?</p>