WordPress templating system for custom plugins

The various styles of mixing and matching HTML and PHP has always been a bear. Circumstances sometimes dictate the method you use, but many developers prefer one style or another and WordPress tends to use the style in your example.

Another option, which is a bit cleaner in my opinion is to make use of the heredoc syntax in PHP which allows for simple variable substitution. http://php.net/manual/en/language.types.string.php

$Output = <<< EOF
<h1>$title</h1>
<h3>$subtitle</h3>
<div class="description">$content</div>
EOF;

return $Output;

You can’t do away with the PHP variables entirely, but you can make it easier to write, read, and maintain.