WP Manifestindependent plugin directory
manifest / content / doctor-directory

Doctor Directory

Wordpress developer test:

by Gabriel Omar Almendras Peña · github.com/gaboap/doctor-directory · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/gaboap/doctor-directory/archive/refs/heads/master.zip

Readme

# Doctor Directory — WordPress Plugin

A national-level doctor directory with full CRUD management, built as a WordPress plugin.

Requirements

  • WordPress 6.0 or higher
  • PHP 7.4 or higher
  • MySQL 5.7 or higher

Installation

  1. Copy the doctor-directory folder into /wp-content/plugins/
  2. Log in to the WordPress admin panel
  3. Go to Plugins → Installed Plugins
  4. Find Doctor Directory and click Activate
  5. The database table is created automatically on activation
  6. The Doctor Directory menu will appear in the left sidebar

Database

The plugin creates a single table wp_doctors with the following schema:

Column Type Notes
id INT Primary key, auto-increment
full_name VARCHAR(150) Required
email VARCHAR(150) Required, unique
address TEXT Required
created_at DATETIME Set on insert
updated_at DATETIME Updated automatically

The SQL schema export is located in /sql/schema.sql.

Access & Roles

Only WordPress users with the Administrator role can access the Doctor Directory. This is enforced via the manage_options capability on all admin pages and validated server-side on every form submission via DD_Auth::require_manage_permission().

Role Access
Administrator ✅ Yes
Editor ❌ No
Author ❌ No
Contributor ❌ No
Subscriber ❌ No

Features

  • Add, edit, and delete doctors with confirmation modal
  • Live search with AJAX (no page reload)
  • jQuery client-side validation with inline error messages
  • Server-side validation mirroring client rules
  • Parameterized queries throughout (no SQL injection risk)
  • WordPress nonce verification on all forms and actions

Tech Stack

  • Backend: PHP (OOP, class-based architecture)
  • Database: MySQL via $wpdb (WordPress database abstraction)
  • Frontend: HTML, CSS with WordPress admin styles
  • Scripting: jQuery (bundled with WordPress)
  • Environment: WordPress plugin (Admin Menu integration)

Author

Gabriel Omar Almendras Peña

Read the full README on GitHub →