Assert that the $post is set and is an object before attempting to access it's ID property when doing the access_denied_redirect()
Implementing test for remote calls for debugging blocked IP addresses