refactor update checks into function

checks theme/plugin object, WP version and PHP version