Description
Rug Size Calculator with Visualizer helps your visitors instantly find the right rug size for any room in their home. No guesswork, no measuring confusion — just clear, accurate recommendations based on proven interior design rules.
Built for interior design bloggers, home decor shops, and furniture retailers who want to add real value to their audience.
What it does:
- Recommends standard rug sizes based on room dimensions and furniture
- Shows a live top-down canvas visualizer of the room, rug, and furniture to scale
- Covers 4 room types: Living Room, Bedroom, Dining Room, Entry/Hallway
- Switches between Imperial (inches/feet) and Metric (cm/m)
- Snaps recommendations to real-world standard rug sizes
- Lets visitors copy the result, copy size only, or download a PNG
- Sends the recommendation to any email address via
wp_mail() - Includes a Gutenberg block with brand-color controls in the Inspector panel
- Shortcode:
[ssg_rug_calculator] - Outputs Schema.org structured data (WebApplication) for SEO
Room-specific logic:
- Living room — calculates based on sofa width, layout (front legs vs all legs), and wall clearance preference
- Bedroom — supports Twin through Cal King; handles partial-under, full-under, and side runner layouts
- Dining room — rectangle and round tables; always adds 24″ for chair pull-out clearance
- Entry/Hallway — recommends runner sizes with wall clearance options
Shortcode
[ssg_rug_calculator]
All attributes are optional. Use them to match your brand colors:
[ssg_rug_calculator primary="#d96b5b" accent="#6f9e8d" bg="#faf7f2" text="#1f1f1f" border="#e7e2dd"]
Attribute
Default
Description
primary
#d96b5b
Button / highlight color
accent
#6f9e8d
Rug color in visualizer
bg
#faf7f2
Calculator background
text
#1f1f1f
Body text color
border
#e7e2dd
Border / card color
SEO features
- Outputs Schema.org WebApplication JSON-LD structured data on any page the shortcode is used on
- Clean, semantic HTML with ARIA roles and labels for accessibility
- Lightweight — one CSS file, one JS file, no external dependencies
Privacy
This plugin does not collect, store, or share any personal data. The optional email feature uses wp_mail() to send a result to a visitor-supplied address. No data is retained by the plugin after the email is dispatched. No third-party services are contacted.
Blocks
This plugin provides 1 block.
- Rug Size Calculator
Installation
- Upload the
smallspaceglow-rug-calculatorfolder to/wp-content/plugins/. - Activate the plugin through the Plugins screen in WordPress.
- Add
[ssg_rug_calculator]to any page or post — or use the Rug Size Calculator Gutenberg block.
FAQ
-
Does the email feature work out of the box?
-
The email feature uses
wp_mail(). It requires your host to have a working mail server configured, or an SMTP plugin such as WP Mail SMTP. -
Can I change the colors to match my brand?
-
Yes — use shortcode attributes or the Gutenberg block’s Inspector sidebar to set any hex color.
-
Does this plugin work with the Classic Editor?
-
Yes. Use the
[ssg_rug_calculator]shortcode anywhere. -
Will it conflict with my theme?
-
The plugin uses scoped CSS with high specificity to prevent theme styles from leaking in. All styles are namespaced under
.ssg-rug-calculator. -
What PHP version is required?
-
PHP 7.2 or higher.
-
Is it mobile-friendly?
-
Yes. The layout switches to a single-column stack on screens below 720px.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Rug Size Calculator by SmallSpaceGlow” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Rug Size Calculator by SmallSpaceGlow” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.1.4
- Fixed footer background inheriting dark theme colors — now fully isolated with scoped CSS.
- Added Schema.org WebApplication structured data output for SEO.
- Added ARIA role and label to calculator widget for accessibility.
- Improved CSS specificity throughout to prevent theme overrides.
- Updated plugin name to be more descriptive for WordPress directory search.
- Bumped version.
1.1.3
- Security: escaped inline CSS variable output.
- Fixed text domain consistency in Gutenberg block.
- Added wp_set_script_translations() for block i18n.
- Added License URI to plugin header.
- Sanitized site name in email subject line.
- Escaped row_meta link with esc_url().
- Removed duplicate “Visit plugin site” link.
1.1.2
- Added Gutenberg block with Inspector color controls.
- Added PNG download feature.
1.1.1
- Added metric/imperial unit switching.
- Added email result feature.
1.1.0
- Initial public release.
