Skip to content

codedaf/WordPress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›‘οΈ RooSecure Security Suite (Lite)

Current Version: 8.5.4
Author: Diego F.
License: GPLv2 or later
Compatibility: WordPress 6.x+


🧩 GENERAL OBJECTIVE

Develop a modular, secure, and scalable WordPress plugin that provides cybersecurity and hardening features with a centralized dashboard, clean design, and future-ready architecture, designed to evolve into a Pro/Freemium version.

Built with PHP, HTML, JavaScript, and CSS, following modern best practices in coding and security:

  • Strong validation (try/catch, sanitization, nonces).
  • Clear separation between logic, presentation, and configuration.
  • Use of native WordPress hooks.
  • High modularity and maintainability.
  • Fully compliant with WordPress Coding Standards (WPCS).

βš™οΈ PROJECT STRUCTURE

roosecure-security-suite/ β”œβ”€β”€ roosecure-security-suite.php β†’ Main plugin file. β”œβ”€β”€ includes/ β”‚ β”œβ”€β”€ menu.php β†’ Registers main and submenu pages. β”‚ β”œβ”€β”€ settings.php β†’ Global configuration and options management. β”‚ β”œβ”€β”€ roles.php β†’ Custom capability definitions. β”‚ β”œβ”€β”€ logger.php β†’ Internal logging and auditing module. β”‚ β”œβ”€β”€ helpers.php β†’ Common reusable functions. β”‚ └── security-hooks.php β†’ Core security hooks (login, IP blocking, etc.) β”œβ”€β”€ admin/ β”‚ β”œβ”€β”€ dashboard.php β†’ Main dashboard with metrics and status. β”‚ β”œβ”€β”€ login-protection.php β†’ Login protection configuration page. β”‚ β”œβ”€β”€ firewall.php β†’ Firewall settings. β”‚ β”œβ”€β”€ email-alert.php β†’ Email alert configuration. β”‚ β”œβ”€β”€ hardening.php β†’ WordPress hardening options. β”‚ β”œβ”€β”€ fast-scanner.php β†’ Quick security scan tool. β”‚ β”œβ”€β”€ multiusuario.php β†’ User access and role management. β”‚ └── rendimiento.php β†’ Performance and optimization. β”œβ”€β”€ assets/ β”‚ β”œβ”€β”€ css/ β”‚ β”‚ β”œβ”€β”€ main.css β”‚ β”‚ └── dashboard.css β”‚ └── js/ β”‚ β”œβ”€β”€ main.js β”‚ └── dashboard.js └── uninstall.php β†’ Safe cleanup on plugin uninstall.


🧱 MAIN COMPONENTS

πŸ”Ή roosecure-security-suite.php

  • Defines namespace and constant ROOSECURE_VERSION.
  • Registers activation and deactivation hooks.
  • Loads dependencies (includes/*.php).
  • Initializes menu, scripts, and global styles.

πŸ”Ή includes/menu.php

  • Creates the β€œRooSecure Security Suite” sidebar menu in the WordPress Admin.
  • Dynamically loads tabs (Dashboard, Firewall, Login Protection, etc.).
  • Implements a global Dark Mode using localStorage with smooth transitions.

πŸ”Ή includes/settings.php

  • Registers plugin options via WordPress Settings API (register_setting).
  • Stores and manages global security configurations:
    • Maximum failed login attempts.
    • Lockout duration.
    • Blocked IP list.
  • Future support for export/import configuration.

πŸ”Ή includes/security-hooks.php

  • Contains main security logic:
    • wp_login_failed β†’ tracks failed login attempts.
    • wp_authenticate β†’ blocks suspicious users or IPs.
    • init β†’ loads firewall rules dynamically.
  • Handles temporary user/IP blocking and notification events.

πŸ”Ή admin/login-protection.php

A clean, modern admin UI for login protection:

  • Fields for failed login attempts, lockout time, and blocked IPs.
  • Uses update_option() to save values securely.
  • Displays confirmation message (β€œβœ… Settings saved successfully”).
  • Includes data validation and nonce protection.

πŸ”Ή admin/dashboard.php

Interactive visual dashboard:

  • Displays three modern info cards with animated completion percentages (e.g., 80%, 60%, 50%).
  • Circular progress indicators using CSS + JS.
  • Glassmorphism design with dark-mode compatibility.

πŸŒ™ GLOBAL DARK MODE

  • Toggle available under Settings tab.
  • State persistence using localStorage.
  • Smooth transitions (fade and color animation).
  • Applies globally to all plugin tabs (text, forms, cards, and buttons).
  • Fully synchronized across sessions.

πŸ”’ SECURITY PRINCIPLES

  • Sanitization: sanitize_text_field(), esc_html(), wp_verify_nonce().
  • Custom roles & capabilities for granular control.
  • CSRF and XSS protection via nonces and escaping.
  • Modular architecture ready for OOP and REST API expansion.
  • Complete data cleanup via uninstall.php:
    • Removes options and transient logs safely.

πŸš€ FUTURE ROADMAP

Pro/Freemium Version Plans:

  • 2FA (Two-Factor Authentication).
  • Advanced malware scanning.
  • GeoIP blocking by country.
  • Integration with external APIs (Slack, Telegram, Cloudflare).
  • Real-time notification center.
  • Remote monitoring via REST API.

πŸ§‘β€πŸ’» DEVELOPER

Author: Diego F.
Contact:

Project: RooSecure Security Suite


About

Code exmple WordPress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published