Call to a member function get_row() on a non-object, Unable to use global $wbdp inside a plugin

In a comment you clarify:

what i meant by running is going to the url
(mysite.com/wp-content/plugins/myplugin/checkrank.php?id=1)

In that case, you are running a standalone file.

Yes, one that resides inside WordPress’ plugins folder, but you don’t access it in the context of WordPress (i.e. from within it). Here, none of the WordPress core functions/methods/classes will be available, because they are simply never loaded.