WP Manifestindependent plugin directory
manifest / admin / smart-task-manager---wordpress-plugin

Smart Task Manager

A simple and secure WordPress plugin to create and manage tasks easily from a single page in the dashboard.

by Sajal Sarkar · github.com/50701/smart-task-manager---wordpress-plugin

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/50701/smart-task-manager---wordpress-plugin/archive/refs/heads/main.zip

Hello! This is a simple and secure WordPress plugin to create and manage tasks easily from a single page in the dashboard.


Part 1: My Plan Before Building

1. How it Works

The plugin adds a new page called "Task Manager" to the WordPress admin menu. On this page, the admin can type a task name and select a status (Pending or Completed). When they click save, the task is saved securely. Right below the form, a clean table shows the list of all tasks.

2. Folder Structure

I organized the plugin files carefully so it looks clean and follows WordPress standards:

  • admin/css/stm-admin.css — Holds the design for the form and badges.
  • admin/partials/stm-admin-display.php — Holds the HTML code for the form and table.
  • includes/class-smart-task-manager.php — The main code that connects everything together.
  • LICENSE — The standard GPLv2 license file.
  • readme.txt — Standard notes for the WordPress Plugin Directory.
  • README.md — This file (documentation).
  • smart-task-manager.php — The main plugin file with header info.
  • uninstall.php — Deletes all data when a user deletes the plugin.

3. How Data is Kept (Custom Post Type)

I chose to use Custom Post Type (CPT) instead of the options table.

  • Why? A task is like a piece of content. In WordPress, content belongs in posts. Using CPT keeps the site fast and organized.
  • Status Trick: I mapped "Completed" to the WordPress publish status, and "Pending" to the draft status. I also hide the default WordPress post list menu so users only see my custom single-page layout.

4. Security & Standards

  • Naming: I used the stm_ prefix before every function and class name so it does not conflict with other plugins.
  • Sanitization: I used sanitize_text_field() to clean user inputs before saving them.
  • Escaping: I used esc_html() and esc_attr() before showing data on the screen to prevent XSS security issues.
  • Nonces: I used WordPress Nonce tokens to protect forms from bad requests.

Part 2: How to Install and Use

How to Install

  1. Download the smart-task-manager.zip file.
  2. Open your WordPress Dashboard, go to Plugins, and click Add New.
  3. Click Upload Plugin, pick the ZIP file, and click Install Now.
  4. Click Activate Plugin.
  5. Look at the left sidebar menu and click on Task Manager.

Technical Details

  • Task Title -> Saved as post_title.
  • Task Status -> Saved as post_status (draft for Pending, publish for Completed).

Future Ideas (Next Features)

The current requirements were just to add and list tasks. In the next version, I want to add:

  1. Delete Button: A simple link on each row to delete a task immediately using wp_delete_post().
  2. AJAX Toggle: A feature to change status by clicking the badge without reloading the page.
  3. Edit Option: A way to change the title of an old task using wp_update_post().

AI Tools Used

  • Gemini: I used Gemini as a coding assistant. I wrote the core technical plan and this documentation myself, then used Gemini to refine the English flow and double-check that my folder structure matches WordPress Coding Standards (WPCS).