Opened 19 months ago
Last modified 17 months ago
#58363 new enhancement
Update Hello Dolly plugin to current standards
Reported by: | dartiss | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Plugins | Keywords: | |
Focuses: | coding-standards | Cc: |
Description
The Hello Dolly plugin is included with core as a demonstration of how to write a simple plugin. However, it was written 15 years ago and is no longer demonstrating the best practices that are now in use. Indeed, the plugin lacks escaping of the output and doesn't add translation for the main lyrics. And the README is so minimal it can hardly be considered a good example to those creating their first plugin.
I've created a fork of Hello Dolly where I've resolved all of these issues, whilst not changing what the plugin does at all. It passes PHPCS WordPress checks, as well as any other validation I can throw at it. It includes a revised README, better explaining the purpose of the plugin, as well as better quality commenting in the code itself. The CSS is no longer in-line but enqueued from a separate, minimised file. I've even compressed the assets.
Even if you don't want to use my forked version, I think a major revision of the code would be majorly beneficial if we want to retain the benefits that the plugin inclusion offers within core.
Related: #11538