FC Retirement Age Plugin

A Free Calculator for WordPress Websites and Blogs

Updated March 2023 v1.5.4

  Original Size  
Use these shortcodes in the page's content editor for above result:
[fcretireageplugin sc_size="medium" sc_custom_style="No" sc_add_link="yes" sc_brand_name="Friendly Financial's" sc_hide_resize="No" sc_current_age="29" sc_current_savings="17000" sc_invest_amt="755.0" sc_rate="5.25" sc_goal_amt="1100000.0"]

This plugin is also available for download at WordPress.org Plugin Directory

This plugin easily answers the question, "At what age can I retire given my present retirement fund and future, planned investments?" The calculator creates an investment schedule and charts. Your site visitors can select their own currency and date convention which is ideal if the host site attracts visitors from around the globe. The website or blog owner can select from four predefined sizes or modify a CSS file to customize both size and colors. The FC Retirement Age Plugin Calculator is based on and uses the code from the very popular Retirement Age Calculator.

Rebranding with your site's brand name is supported and encouraged.

The plugin may be

  1. used in a post or page's content area via a shortcode; or
  2. used in a sidebar widget area; or
  3. called from any template file.

Installation

  1. Either
    1. upload the fc-retirement-age-calculator folder with all its files to the /wp-content/plugins/; or
    2. unzip the plugin's zip file in the /wp-content/plugins/  folder.
  2. Activate the plugin through the Plugins Installed Plugins menu in WordPress

Upgrading: If you've translated the plugin from English to another language, please backup your work prior to upgrading the plugin.

Usage

There are 3 mutually exclusive ways you can deploy the calculator to an individual page (though you can use all three methods on different pages within a site):

  1. Add the shortcode [fcretireageplugin] in the content area of your page or post and configure shortcode parameters.
  2. Add the following code to your template where you want the calculator to appear.
    • <?php show_fcretireage_plugin(); ?>
  3. If you are using widgets, just add the plugin to the sidebar through the Appearance Widgets menu in WordPress. Be sure to click Save.

Shortcode parameters

  • sc_size= "tiny" | "small" | "medium" | "large"
  • sc_custom_style= "No" | "Yes"
  • sc_add_link= "Yes" | "No"
  • sc_brand_name="Your Name"
  • sc_hide_resize= "No" | "Yes"
  • sc_current_age=
  • sc_current_savings=
  • sc_invest_amt=
  • sc_rate=
  • sc_goal_amt=
  • sc_currency=
  • sc_date_mask=

Shortcode Examples:

Copy and paste to page's or post's content area.

First example includes all options.

[fcretireageplugin sc_size="tiny" sc_custom_style="No" sc_add_link="Yes" sc_brand_name="Your Name Here" sc_hide_resize="No" sc_current_age="29" sc_current_savings="17000" sc_invest_amt="755.0" sc_rate="5.25" sc_goal_amt="1100000.0" sc_currency="83" sc_date_mask="2"]
[fcretireageplugin sc_size="small" sc_custom_style="Yes" sc_hide_resize="Yes" sc_currency="83" sc_date_mask="2"]
[fcretireageplugin sc_custom_style="No" sc_add_link="Yes" sc_brand_name="Friendly Financial" sc_hide_resize="Yes"]

Optional array parameter passed to
show_fcretireage_plugin()

This can be copied and pasted to a template part.

Valid values for options are the same as the shortcode above.

<?php show_fcretireage_plugin(array( 'op_size' => "medium", 'op_custom_style' => "No", 'op_add_link' => "Yes", 'op_brand_name' => "", 'op_hide_resize' => "No", 'op_current_age' => "28", 'op_current_savings' => "18000", 'op_invest_amt' => "750.0", 'op_rate' => "5.5", 'op_goal_amt' => "1000000.0", 'op_currency' => "999", 'op_date_mask' => "999")); ?>
Notes:
  1. If you want to add your brand to the calculator, the add link option must be set to "Yes".
  2. When branding, your brand name will be added before "Retirement Calculator".
  3. If custom style is set to "Yes", the plugin will load fin-calc-widgets-custom.css located in the plugin's CSS folder. If you set the option to "Yes" without making any changes, the calculator will change to a horrendous red which indicates the custom css is being used.
  4. The plugin is built and tested on HTML5/CSS3 pages.
  5. max-width: large: 440px, medium: 340px, small: 290px, tiny: 150px
  6. New: Website developers can set a default currency sign and preferred date format by setting <op /sc>_currency and <op /sc>_date_mask respectively. Set one or both to an integer value. For the list of integers to support 90 plus currency symbols and 6 date format options, see the file currency_and_date_conventions.txt in the plugin's root folder. (example: India, Indian Rupee: ₹1,23,45,678.99 = 83)
Enhanced Internationalization

New: Support for over 90 currency signs (using appropriate nummber formatting conventions) and 6 date formats (mm/dd/yyyy, dd/mm/yyyy, yyyy.mm.dd etc.). If neither the website developer or the user makes a selection, the calculator will read the browser's default currency and date options and automatically use them. Without doing anything, a website visitor from Japan visiting a website hosted in France will initially see a floating yen sign. The website developer can easily override this default behavior by setting either shortcodes or function options. The user (if the website designer keeps the feature enabled) can override both and select a currency and date format.

To summarize, the plugin determines what currency symbol (and date format) to use by applying the following rules:
  1. If a website allows a user to select a symbol, and the user makes a selection, the plugin uses the visitor's choice first.
  2. Otherwise, if a user has not made a selection, and the website owner has set a default currency (i.e., currency does not equal 999), the calculator uses the website's selection.
  3. Otherwise, the calculator plugin will attempt to read the browser's currency default and pick a currency symbol.
  4. Otherwise, the plugin defaults to using the '$' symbol.
Language Translations

New in v1.5, support for 14 languages in addition to English. The plugin also includes a translation template file (.POT) in the "languages" folder. Using a POT/PO file editor, website owners can translate this plugin to any language supported by WordPress.

The supported languages are:

  • da : Danish : Dansk
  • nl : Dutch : Nederlandse
  • fi : Finnish : Suomalainen
  • fr : French : Français
  • de : German : Deutsch
  • hu : Hungarian : Magyar
  • it : Italian : Italiano
  • lt : Lithuanian : Lietuvių
  • pl : Polish : Polski
  • pt : Portuguese : Português
  • ro : Romanian : Românesc
  • ru : Russian : Русский
  • es : Spanish : Español
  • sv : Swedish : Svenska

Notes: (1) The plugin depends on the site's "Site Language" setting to display to your visitors the correct language. The files in the language folder can be renamed if needed. For example, if you want the plug to display in Portuguese the .MO and .JSON files include assume your site's language setting is Portuguese (Portugal) which is local pt_PT. But if your site is in Brazil, you'll need to rename the plugin's language files to use pt_BR. (2) At this time, these translations were computer generated. A fluent speaker can edit the included .PO file and regenerate the .MO file to update the tranlation. (3) If you are willing to allow me to include your edits with the plugin, I'll regenerate the .MO, and if needed the .JSON files for you.

I am making the other calculators available free-of-charge to bloggers who are able to help with translation. See this page for details.

Screenshots

retirement age calculator plugin
Two of the predefined screen sizes showing relative difference between "large" and "tiny".
retirement plan investment schedule
Example retirement schedule with detailed header and projected investment dates.
retirement age charts
Creates three charts for visualization.
WordPress option page for retirement age plugin
Configuration screen in WordPress's admin area
(only for when installing in a sidebar area).

14 Comments on “Retirement Age Plugin”

Join the conversation. Tell me what you think.
  • Festus Otasowie says:

    Hello Support,
    First I want to thank you for your retirement calculators. I have been using them since 2019 on my site netmoneyhacks.com/retirement planning. I use the Retirement Age, Savings and Nest Egg calculators.
    I have been using version 1.12, but recently upgraded to WordPress 5.6 from 5.5.3 but the calculators have stopped working given error message below:

    Deprecated: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` in /home/a81ts73yoktz/public_html/netmoneyhacks.com/wp-content/plugins/fc-retirement-savings-calculator/fc-retirement-savings-calculator.php on line 228

    This error appears on several lines
    Funny enough I tried the FC savings calculator and was able to install it successfully without any errors. But the three calculators i am interested above don’t work and give errors.

    Please can you help share an updated version of the php files if you have? Or any tweak that can make them work? I don’t mind moving to version 1.4.3 but they are not working either on my upgraded WordPress version 5.6
    Would appreciate your help. Thanks, Festus

    • Hi Festus, thank you for writing, and I’m sorry you are having a problem with the plugin.

      Please provide a public, working URL to the plugins on your site so that I can investigate the problem. The plugins are working fine on this site, and the site has been upgraded to WordPress 5.6.

      For example, take a look at this plugin.

      • Festus Otasowie says:

        Hello Karl,
        Thanks for your swift response.
        I am so pleased to hear the calcs are working on WP 5.6.
        The problem I am having is that when I try to activate the calc after downloading and installing, I get those error messages filling the screen. Then every other page on my blog site also displays those error messages on the top of each page before the article. Needless to say, the post that contains the calc just displays the shortcode. see one of the pages https://netmoneyhacks.com/retirement-age-calculator/
        Please I don’t know how to provide a working public URL to the plugins. Can you tell me how? If not then I don’t mind providing you access to my WP admin if I have a secure way to pass the log in details to you. I really appreciate your help, Karl.

        • I believe I know what the problem is. Your site must have been upgraded to PHP 7.4.x recently. The error you reported is a PHP error. See PHP changes. I did not know about this. Thanks for reporting it.

          If you know PHP at all, you can make the fix in the file you have. Or you can wait for me to update the plugins. I will try to get to that this coming week.

      • Festus Otasowie says:

        Hello Karl,
        Thanks once again for your willingness to address this issue next week. I really appreciate it as three of my articles are not available as a result of these calculators not working at the moment. However, while you are working on it. I would like to attempt a fix if you can just give me some direction on what to do.
        And now that you would be working on it I think I need to give you more information about some of the diagnostics I did before coming to you:
        1. true I upgraded to PHP 7.4x a few months ago, but my other website (www.kabaia.com) in which I also tested the 1.43 version and it worked is on the same server as the one in question. The website kabaia.com and netmoneyhacks.com are both subdomains on a site. So they both are hosted on Godaddy and both have PHP 7.4x installed accessed via the same cPanel.
        2. FC Savings calculator ver 1.4.3 is working perfectly on this same site netmoneyhacks.com.
        3. All the 3 calculators (ver 1.12) have been working with the same PHP ver 7.4x (which I upgraded months ago) on this site until I upgraded to WordPress 5.6 yesterday.
        4. You may want to note this very well: My first attempt yesterday at upgrading from WordPress 5.5.3 to WordPress 5.6 using the WP Admin failed and had to redo it using Software upgrade from the Cpanel. Could this be the issue? My next step was going to be manually uploading and copying the WordPress 5,6 archive files into the relevant directories to see if that helps. Do you think I need to proceed in that direction?
        Regards, Festus

        • Thank you for those details.

          I appreciate you are blocking your pages. I will therefore attempt to get a fix out sooner. But a lot of the effort is figuring out exactly how to make the fix. If I had the changes figured out, rather than send you instructions, I would just make them. 🙂

          There is one thing interesting, and I was actually wondering about this. The fact that the calculators work on a different site tells me that PHP is configured differently on the different web servers. I felt it was strange that the code failed because the change (I sent you the link) is only listed as "depreciated" which means the code should continue working. This seems right since other users have not reported this problem. Perhaps while you wait for my fix, you can contact your web host, send them the link to the PHP page I sent, and ask if they can configure the PHP not to fail. It’s very heavy-handed that it does, in my opinion.

        • I sent you an email with 3 replacement files that should fix your issues with PHP 7.4.x. Please update to the latest versions of the 3 plugins and then replace the files with the ones I sent you. Thanks.

  • Hello Karl,
    I would like to get your FC Retirement Age Calculator and couple of others working on my non-commercial website.

    I have the latest WordPress 5.8 and BoldGrid website (https://timetravelvideos.com).

    I entered shortcode [fcretireageplugin] in the content block but nothing happens. Also the code on the php text page does not work. The plugin works through the widgets, but is not placed in the content location required.

    What needs to be done?

    Regards,
    Moiz

    • Is there a way you can provide a link to the page where you have the calculator installed, and enabled?

      Or set up a dummy page to duplicate the problem and send me a link via the details on the contact page of my site and I’ll take a look – probably on Monday now.

    • One other thing, do you have any other plugins that you can successfully install via shortcodes.

      The fact that the calculator displays, but not where/how you want it, implies that the problem is one with the pages layout or css.

      • Hello Karl,
        I tried the short code again today to send you a dummy page link, and your plugin worked.
        You are very generous to allow us to use your plugins free. I will use some of your other ones. I have a non-commercial web site. You will credit and link on my website, for sure.
        Regards,
        Moiz

  • It’s possible to change the colors in the the chart? Or anyone can do this for me?

    • I have not yet surfaced a feature that allows the chart colors to be changed via the WordPress interface. That might be a future enhancement.

      However, the plugin that you download includes all source code. A developer could edit the source to change the chart colors. I’m not able to provide support at this time for documenting how to make this change though.

Comments, suggestions & questions welcomed...