WP Manifestindependent plugin directory
manifest / ecommerce / scarcity-counter

Scarcity Counter WP Registry grade B. Medium-severity findings · 1 findingWP RegistryMedium-severity findings · 1 findingOpen the reportB

WordPress Plugin for artificial scarcity. Great for marketing purposes.

★ 0stars
12release downloads
≈10active sites
v1.1.0latest · 8 years ago

Install

Download scarcity-counter.zip From the v1.1.0 release on GitHub, Apr 22, 2018

Upload it under Plugins → Add New Plugin → Upload Plugin, then activate.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/simonmayerhofer/scarcity-counter/releases/download/v1.1.0/scarcity-counter.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Scarcity Counter is a WordPress plugin for artificial scarcity. It is great for marketing purposes. By providing timelimits and random reduction numbers it aims to make it not too obvious it's fake. Be aware that it is just client side. So if the user visit your site on another device another number will be visible.

It works with multiple counters on a page. Use the same id attribute to show the same counter at different places on your page.

Demo

You can see it in action on Codepen.

Shortcode

[scarcity-counter id="id" start="27" min="3" reduction="3" timelimit="5000"]

Attributes

  • id Unique id to identify the counter. You should always use new ids on different pages! If used multiple times on the same page, the same number is shown. defaults to id.
  • start number to start with. defaults to 27.
  • min lower limit. the counter won't ever get below that limit. defaults to 3.
  • reduction upper range limit. E.g. if 5 is set as the limit, the counter will be reduced by a number between 1 and 5. defaults to 3.
  • timelimit number in milliseconds how long to wait until another reduction (on page reload). defaults to 5000.

Requirements

To compile this plugin, it requires the following modules installed on your system:

  1. Composer
  2. Grunt

Compilation

To compile the plugin follow the following steps:

  1. Navigate to this plugins directory
  2. Setup composer: composer install
  3. Install npm modules: npm install

After you followed the steps above you're able to compile the project with grunt build.

Use grunt watch to watch the files for changes.

FYI: You can just go to Releases to download a already compiled release.

Releases

2 releases. Each count is every asset in that release; expand a row for the breakdown.

Tag
Published
Assets
Downloads
v1.1.0 latest
Apr 22, 2018 8 years ago
scarcity-counter.zip
6
Apr 22, 2018 8 years ago
scarcity-counter.zip
6

Active-site estimate ≈10 comes from the median of recent superseded releases. Method.

B grade

Security

Scarcity Counter 1.1.0 · audited by WP Registry

Medium-severity findings.

1 medium
Audited release
1.1.0
Findings
1
Worst severity
medium
Content hash
dfa5970ec784bbd9da12afe2…

Findings

  • medium Unescaped shortcode attributes enable stored XSS

    xss_stored

    get_shortcode() concatenates $atts['id'], start, min, reduction, and timelimit directly into HTML data-* attributes without esc_attr(). A user who can insert shortcodes (Author/Contributor depending on site) can break out of attributes and inject event-handler markup into the front end.

    class-scarcitycounter.php:80-90

    Recommendation

    Escape every attribute with esc_attr(); prefer cast numeric atts with absint().

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.