import React, { useMemo } from 'react'; import { ExternalLink, Check, Download, Power, ArrowRight } from 'lucide-react'; /** * Recommendation panel for the Deep Malware Cleaner plugin. * * Deliberately NOT styled as one of the feature cards above: malware scanning * is a separate plugin, so presenting it identically to Admin Safety Guard's * own features would imply it ships with this plugin. The wide layout, tinted * "companion plugin" header strip and explicit wording make the distinction * obvious at a glance. */ export default function CompanionPlugin() { const data = (typeof tpsaAdmin !== 'undefined' && tpsaAdmin.companion) || {}; const { name = 'Deep Malware Cleaner', installed = false, active = false, dashboard_url: dashboardUrl = '', install_url: installUrl = '', plugins_url: pluginsUrl = '', wporg_url: wporgUrl = 'https://wordpress.org/plugins/deep-malware-cleaner/', } = data; const uid = useMemo(() => `cp-${Math.random().toString(36).slice(2, 9)}`, []); const capabilities = [ 'Scans core, plugin, theme and upload files', 'Detects injected and obfuscated code', 'Flags suspicious database content', 'Removes and quarantines what it finds', ]; // Primary action depends on whether the plugin is already there. let primary; if (active && dashboardUrl) { primary = { label: `Open ${name}`, href: dashboardUrl, external: false, Icon: ArrowRight, }; } else if (installed && pluginsUrl) { primary = { label: 'Activate the plugin', href: pluginsUrl, external: false, Icon: Power, }; } else if (installUrl) { primary = { label: 'Install free plugin', href: installUrl, external: false, Icon: Download, }; } else { primary = { label: 'View on WordPress.org', href: wporgUrl, external: true, Icon: ExternalLink, }; } const PrimaryIcon = primary.Icon; return (
Malware scanning and cleanup are handled by our dedicated free plugin instead of being duplicated here, so you get a single, complete tool for the job rather than two partial ones.