I want my plugin to register a script only in a certain page.
For example, inside my plugin file I want to write something like this:
if (is_page())
You could use is_page() after template redirect so you need to add in the hook like this :
is_page()
add_action('template_redirect','your_function'); function your_function(){ if ( is_page('test') ) { // do you thing. } }