Plugin.php: remove duplicated code

There are some duplicated code when I commit the file before by mistake.
Remove them now.