wp simple plugin with shortcode code example
Example 1: how to use plugin shortcode in wordpress template
<?php echo do_shortcode("[insert-your-shortcode-here]"); ?>
Example 2: generate shortcode wordpress plugin
add_filter( 'widget_text', 'shortcode_unautop' );
add_filter( 'widget_text', 'do_shortcode' );