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">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<body>sample Body text
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.