Description
NIIC Key Cabinet Manager helps you keep track of a large physical key inventory: which cabinet slot a key lives in, which room(s) it opens, how many copies you have, and who currently has one checked out.
It’s built for organizations managing dozens to hundreds of physical keys — front desks, facilities teams, property managers — who need a simple lookup tool without standing up separate software or accounts.
Features
- Rooms — track room number, building, floor, and notes on what the room is used for.
- Keys — each key has a Core Mark (the code stamped on the physical key) and a Key Code (its cabinet slot/pin), plus a quantity on hand. A key can open multiple rooms, and a room can have multiple keys (e.g. a master key plus an individual key).
- Search — one search box matches room number, Core Mark, or Key Code, and shows the match whether or not a key/room link has been made yet.
- Assignments — check a key out to a person (name, organization, email, phone), see everything currently checked out at a glance, and check items back in. Assignment history is kept even if the underlying key is later deleted.
- CSV import/export — export your full Keys or Rooms list to CSV, edit it in a spreadsheet, and re-import it. Existing rows are matched and updated by Core Mark or Room Number; new rows are created. Handy for bulk-loading an inventory or making mass edits.
- No separate accounts — uses your existing WordPress logins, gated by a dedicated capability rather than a separate password system to manage.
- No external services — all data lives in your WordPress database. Nothing is sent to a third party.
How it works
Add the [niic_key_cabinet] shortcode to any page. Logged-out visitors see a login prompt; Administrators and Editors see the full tool (Search, Keys, Rooms, Assignments) right on that page by default. Everyone else (Author, Contributor, Subscriber, or any other role) is logged in but told they don’t have access.
Access control
The plugin defines its own capability, manage_key_inventory, and grants it to the Administrator and Editor roles when it’s activated (or updated to this version). This gate applies everywhere — the page itself, and every underlying save/delete/check-out/import/export action — not just the visible menu, so a role without the capability can’t reach the data by any route.
If you need a different role (or one specific person) to have access, no settings screen is needed — a developer (or a free role-editor plugin) can grant the capability directly, e.g.:
get_role( 'author' )->add_cap( 'manage_key_inventory' );
This only ever needs to be run once; WordPress remembers role capabilities in the database.
Installation
- Upload the
niic-key-cabinet-managerfolder to/wp-content/plugins/, or install the plugin zip through the WordPress admin Plugins Add New Upload Plugin screen. - Activate the plugin through the Plugins screen in WordPress.
- Create (or edit) a page and add the
[niic_key_cabinet]shortcode to its content. - Visit that page while logged in to start adding rooms and keys.
No configuration screen is needed — the plugin creates its own database tables on activation.
FAQ
-
Do I need to create new logins for my staff?
-
No. NIIC Key Cabinet Manager uses your existing WordPress user accounts — anyone with an Administrator or Editor account (the default access level) can use the tool as soon as it’s activated.
-
Can I limit this to certain user roles?
-
It’s already scoped to Administrators and Editors by default, not every logged-in account. There’s no settings screen for changing that yet — to grant access to a different role or a single user, add the
manage_key_inventorycapability to it (see “Access control” above), or use a free role-editor plugin. To narrow it further (e.g. Administrators only), remove the capability from the Editor role:get_role( 'editor' )->remove_cap( 'manage_key_inventory' ); -
What happens to assignment history if I delete a key?
-
The assignment record is kept for your history/audit trail; it will just display as “(deleted key)” instead of the key’s Core Mark.
-
Yes. It’s plain PHP and MySQL using WordPress’s own
$wpdbdatabase layer — no Node, no external services, and no special server configuration required. -
Can one key open more than one room, or one room have more than one key?
-
Yes, keys and rooms have a many-to-many relationship — useful for master keys that open several rooms, or rooms that have both an individual key and a master key.
-
What format does the CSV import/export use?
-
Keys export as Core Mark, Key Code, Quantity, Rooms, Notes — multiple linked rooms are separated by semicolons in the Rooms column (e.g.
204; 305A). Rooms export as Room Number, Building, Floor, Notes. Column order doesn’t matter on import, only the column names in the header row. Importing a Core Mark or Room Number that already exists updates that row instead of creating a duplicate; if a key’s Rooms column references a room that doesn’t exist yet, it’s created automatically.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“NIIC Key Cabinet Manager” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “NIIC Key Cabinet Manager” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.4.0
- Security/code-quality fixes from the WordPress.org Plugins Team’s manual review:
- Form data that’s temporarily stored for error-repopulation is now sanitized field-by-field on the way in, not just escaped on the way out.
- All internal function names, constants, transient/option keys, and hook names were renamed from the “km”/”KM” prefix (too short/generic) to “niickcm”/”NIICKCM”, to avoid conflicting with other plugins.
- Every database query that used a table name inside the SQL string now passes it through
$wpdb->prepare()using the%iidentifier placeholder (WordPress 6.2+), rather than concatenating it directly.
- Raised the minimum WordPress version to 6.2 (required for the
%iplaceholder above).
2.3.0
- Renamed the plugin from “Keysmith” to “NIIC Key Cabinet Manager” at the request of the WordPress.org Plugins Team — “Keysmith” is an existing coined name associated with another project, and standalone coined names aren’t accepted without prior ownership. The new name pairs a distinctive, owned prefix (NIIC) with a descriptive name, per their guidance. The shortcode changed from
[keysmith]to[niic_key_cabinet]— update any page that uses it. No database changes.
2.2.0
- Renamed the plugin from “Key Manager” to “Keysmith” (WordPress.org requires a distinctive name rather than a generic descriptive one). The shortcode changed from
[key_manager]to[keysmith]— update any page that uses it. No database changes; your rooms, keys, and assignments are unaffected.
2.1.0
- Changed: access is now restricted to Administrators and Editors by default, via a new
manage_key_inventorycapability, instead of any logged-in WordPress account. This applies to every action (viewing, saving, deleting, checking keys in/out, CSV import/export), not just the visible page. See “Access control” above if you need to grant access to another role.
2.0.0
- Added CSV import and export for both the Keys list and the Rooms list, with matching by Core Mark / Room Number so re-importing updates existing rows instead of duplicating them.
- Changed the Key Code field’s description from “(cabinet pin)” to “(to replicate key)” on the Key form.
1.1.1
- Fixed: Search only returned a room if it already had a key linked to it; a room with no key assigned yet would never appear, no matter what you searched. Search now finds rooms and keys independently.
- Added a Notes column to the Rooms list, showing what each room is used for.
1.1.0
- Renamed “Key Code” to “Core Mark” and “Cabinet Pin” to “Key Code” throughout, with an automatic database migration that preserves existing data.
- Added the Assignments feature: check a key out to a person (name, organization, email, phone), and check it back in.
1.0.0
- Initial release: Rooms, Keys, many-to-many room/key linking, quantity tracking, and search, gated behind WordPress login.