Tried changing a version number for a plugin recently, and it didn't go so well.
It took a while before I figured out that the version number in particular was causing this error, and once I did of course I wondered why.
Does WP have a built-in file integrity check? Does it actively monitor plugin versions, and variants, and check them against the corresponding file versions on the official WP plugin depository? Or could it be that some firewall I have installed is causing the issue...?
After I'd opted back to the original plugin to get rid of the error, and modified it again without modifying the version number, I also started getting an update notification for this particular plugin, even though it was already up-to-date.
So that seems to imply it's no firewall, but more so probably a built-in WP security feature.
I did some digging...
Turns out WordPress automatically looks for updates - if your plugin is hosted on wordpress.org - every twelve hours. More info here.
This is done via the
wp_update_plugins cron job.
Theoretically you should be able to bypass this check by modifying the cron jobs, which is easiest done with say a plugin like WP Crontrol.
Even with Cron disabled you might need to edit some
_site_transient_update_plugins fields in your
wp_options table. Information in regard to what plugins need updating, when they were last checked etc etc should be stored here.
If you're working on a plugin outside the WP plugin repository you can also use manual update checks. If you need to fetch plugin data use this. If you want to host your plugins yourself and provide your own updates see this.
In my case, I was attempting to edit an existing plugin for use via my own site, which is probably why I received a critical error, though I haven't been able to find any information on why this would generate a critical error instead of say just an internal error message, notifying you that plugin files have been modified.
When I didn't change the version number - and just updated the file - it worked. But then the admin panel shows a constant 'new version available' message for that specific plugin.
Solution? Make the plugin your own.
Modify variables and file structure, change plugin title and information, make it so there is no longer a link to the official plugin repository by which the plugin can be checked, and voila, it works! No pesky notices. No dependencies. No erroneous or unnecessary version checks no longer.
As long as nobody creates a plugin via the official repository with the exact same name and number and security phrase...
For now though, at least in my case: this is working fine.