Proper structure for first WP plugin?

More research at the WordPress Codex and related sites for current (2016/2017) solutions … the following tested and works fine …

` defined(‘ABSPATH’) or die(‘No direct file access allowed!’);
// Modify post content
function myplugin_filter_content($content)
{
return $content . ‘

Almost an error message but not quite.

‘;
}
add_filter(‘the_content’, ‘myplugin_filter_content’);

function schema_TinyMCE_init($in) {
$props=”@[id|class|style|title|itemscope|itemtype|itemprop|datetime|rel],div,dl,ul,dt,dd,li,span,a|rev|charset|href|lang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur]”;
if (isset($in[‘extended_valid_elements’])) {
if (! empty($in[‘extended_valid_elements’])) {
$in[‘extended_valid_elements’] .= ‘,’;
}
$in[‘extended_valid_elements’] .= $props;
} else {
$in[‘extended_valid_elements’] = $props;
}
return $in;
}
add_filter(‘tiny_mce_before_init’, ‘schema_TinyMCE_init’ );

add_action(‘wp_head’, ‘wpse_43672_wp_head’);
function wpse_43672_wp_head()
{
//Close PHP tags
?>

{CORRECT JSON SYNTAX HERE}

<?php //Open PHP tags

}
/* Stop Adding Functions Below this Line */
?>
`

tech