Doctor Directory
Wordpress developer test:
by Gabriel Omar Almendras Peña · github.com/gaboap/doctor-directory · website
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.zipReadme
# 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
- Copy the
doctor-directoryfolder into/wp-content/plugins/ - Log in to the WordPress admin panel
- Go to Plugins → Installed Plugins
- Find Doctor Directory and click Activate
- The database table is created automatically on activation
- 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 |
| 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