NaveenCodes Safe Mode helps restore access after fatal plugin or theme crashes. It detects fatal PHP shutdown errors, identifies whether the source is a plugin or theme, performs the configured recovery action, records detailed logs, stores recovery history, shows persistent admin notices, and emails administrators.
The plugin does not modify, rewrite, or repair user code. Version 1 is focused only on detection, disabling, recovery, logging, and notification.
NaveenCodes\SafeModencsm_naveencodes-safe-modenaveencodes-safe-mode.phpincludes/includes/Core/Plugin.phpCore: activation, deactivation, settings, plugin bootstrappingDatabase: custom table schemaRecovery: shutdown detection, source detection, queueing, plugin/theme recovery, notificationsLogging: error logs and recovery history persistenceAdmin: dashboard, logs, history, settings, notices, coming soon UIHelpers: focused WordPress helper utilitiesInterfaces: shared service contractswp_ncsm_logs
idtimestamperror_typeerror_messagefile_pathline_numbersource_typesource_nameaction_takenrecovery_status
wp_ncsm_recovery_history
id
timestampsource_typesource_namerecovery_actionrecovery_resultplugins_loaded.error_get_last() on shutdown.wp-content/plugins/... becomes a plugin source.wp-content/themes/... becomes a theme source.plugins_loaded boots the plugin.register_shutdown_function() detects fatal shutdown errors.admin_menu registers the admin pages.admin_enqueue_scripts loads admin assets.admin_notices renders persistent recovery notices.admin_post_ncsm_save_settings saves settings.admin_post_ncsm_export_logs exports logs.admin_post_ncsm_dismiss_notice dismisses recovery notices.The following features are displayed as UI-only cards and are not implemented in Version 1:
Version 1 uses capability checks, nonces, sanitization, escaping, WordPress database APIs, and prepared SQL for dynamic values. It performs no tracking, no hidden data collection, no remote code execution, and no unsafe file rewriting.