WordPress Plugin Development Noticeable Error

When I was developing a free plugin to be submitted to WordPress.org repository, I encounter a weird line says
The plugin generated `n` characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

I troubleshoot it by doing trial and error until I found and deleted this last line of php file

?>

Basically PHP code should look like this

<?php /* your code here */ 
?>

You can omit the 3rd line and it should work.

This seems to be the culprit, based on my experience, this shouldn’t be worried enough and it’s just a minor WordPress problem, you can contact the plugin author for this error in order to help them developing their plugin flawlessly.

Elvin is one of the contributors of mylabplus.com. He has been creating Wordpress Plugins, Magento Extensions, & Mobile Applications. If you find this article useful, please Follow him on .
About Elvin D.
Leave Your Thought