If moodle_needs_upgrading() is true anyone (logged or not) can access the admin index site, view details of installed plugins and download new plugin versions.
1. Downgrade or upgrade a pluging version
2. Go to /admin/index.php when not logged it or logged in as a non-admin user
3. Use automatic installation for a plugin