make sure that the page you are using as a plugin is a full html page with <html> <head> and <body> tags in it, for example:
<?php echo('Hello World');?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>sample Body text
</body>
</html>
the Plugin engine looks for the doctype tag and adds code before the doctype tag to the page it is plugged into before the doctype tag on that page.
it breaks the head and body sections of the page up and adds the code to the respective sections of the main page.
if those tags are missing, then the plugin engine has no way to know what sections the code belongs to.