Calculate Values with Shortcodes
Allows you to display calculated values in your posts and pages. You can even use dynamic shortcodes as variables!
The facts
- Rating
- 4.8★ from 9
- Active installs
- 200+
- Price
- Free
- Last updated
- 20 May 2020
- Added
- May 2018
- Requires WP
- 4.0
- Tested up to
- WP 5.4.21
- Requires PHP
- 5.2.4
- Downloads
- 4,393
Our analysis
AI-assistedCalculate Values with Shortcodes is a WordPress plugin that allows you to perform dynamic calculations within your posts using a simple shortcode. By wrapping expressions in the [calculate] shortcode, you can display real-time calculated values, such as sums or products, directly on your site.
The plugin supports attributes for decimal rounding and international number formatting, making it versatile for various applications. It is suitable for users who need to display dynamic data, such as changing prices or values in tables, without compromising site security.
Best for: This plugin is best for WordPress users who want to display dynamic calculations in their content.
What it does well
- ✓Enables dynamic calculations in posts
- ✓Supports decimal rounding and international formatting
- ✓Does not use dangerous functions like eval
- ✓Free to use from the WordPress.org directory
Where it falls short
- •Limited information on advanced features or use cases
- •Last updated in May 2020, may not be compatible with newer WordPress versions
Verdict
Calculate Values with Shortcodes provides a straightforward solution for integrating dynamic calculations into your posts. However, its last update was some time ago, which may affect compatibility with the latest WordPress versions.
From the developer
bhagwad's own description of Calculate Values with Shortcodes, lightly tidied.
Have you ever wanted to calculate some values dynamically to display in your posts? Let’s say you have some shortcodes that retrieve values in real time from the database. Now you want to perform some calculations on those shortcodes and display the results in your posts or pages. This plugin allows you to use a simple [calculate] shortcode with the expression inside to display these values in real time!
So an expression like [calculate]2+3*4[/calculate] will return the value “14”. Now just replace any numeric value with a shortcode that returns a number and you’re set.
Attributes
You can use the “dec” attribute to specify the number of decimal digits you want to round the result up to. The default is “0”. Meaning that by default, all results will be rounded to an integer.
For international number formatting, you can use the “int” attribute to specify a locale. For example, int=”fr_FR” will format the numbers according to the french locale!
See screenshots for illustrations.
For example, you can use this to display values in a table that are constantly changing. Or refer to dynamic prices multiplied by some value. The possibilities are endless.
You can see a real world example of this plugin at work here:
The best part is, it doesn’t use dangerous functions like “eval” to work – which means all authors can use it safely. There’s no danger of it breaking your site.