Title: Fortop Referral Search Term
Author: fortop
Published: <strong>November 16, 2026</strong>
Last modified: November 16, 2026

---

Search plugins

![](https://ps.w.org/fortop-referral-search-term/assets/icon-256x256.png?rev=3805833)

# Fortop Referral Search Term

 By [fortop](https://profiles.wordpress.org/fortop/)

[Download](https://downloads.wordpress.org/plugin/fortop-referral-search-term.0.2.0.zip)

 * [Details](https://wordpress.org/plugins/fortop-referral-search-term/#description)
 * [Reviews](https://wordpress.org/plugins/fortop-referral-search-term/#reviews)
 *  [Installation](https://wordpress.org/plugins/fortop-referral-search-term/#installation)
 * [Development](https://wordpress.org/plugins/fortop-referral-search-term/#developers)

 [Support](https://wordpress.org/support/plugin/fortop-referral-search-term/)

## Description

Fortop Referral Search Term is a modernization inspired by SEO SearchTerms Tagging
2 version 1.535 by Purwedi Kurniawan (poer), maintained by fortop. It is not an 
official successor, transfer of the original listing, or claim of endorsement.

This release supports local referral analysis and relevant, reviewed visitor navigation.
Do not use it for keyword stuffing, doorway/search-page generation, artificial link
building, or ranking manipulation. Moderation does not make irrelevant keyword lists
appropriate. No indexing, ranking, or traffic improvements are promised.

Licensing: GPLv2 or later. The original directory snapshot has no explicit license
header. The official Plugin Directory requirements state that code without a specified
license is considered GPLv2 or later: https://developer.wordpress.org/plugins/wordpress-
org/ . This is the documented basis, not a newly obtained personal license grant
or transfer of the original listing. The full GPLv2 text is included in LICENSE.
txt; the header permits later versions. No original screenshots, third-party images,
or bundled libraries are included in this installable package.

This 0.2.0 package is prepared for release validation. Directory publication is 
a separate step and is not claimed by this package. Test upgrades on a staging copy
and review the verified scope below before production use.

Features:

 * Optional local collection of search terms actually disclosed in referral URLs.
 * Administrator moderation before terms can be displayed publicly.
 * Post-specific, popular, recent, random, and category term lists.
 * A modern multi-instance widget and [stt2_terms] shortcode.
 * Public legacy template-function compatibility for common STT2 theme calls.
 * Explicit, batched import from the original table without changing it.
 * Explicit addition of an approved term as a post tag by an authorized administrator.
 * Previewed legacy settings and classic-widget migration with source preservation
   and backups.
 * Preview-bound substring deletion or bounded reset batches, with explicit confirmation
   and changed-record protection.
 * Optional, separately authorized automatic tagging and post-date promotion, both
   OFF by default.
 * Configurable retention, prepared database statements, capability and nonce checks,
   and escaped output.
 * Optional restricted, paired HTML wrappers for headings, lists and list items.
 * Optional cleanup of only unused terms (fewer than 10 observations); the existing
   all-terms policy remains the default.

Collection and automatic content append are OFF on a new installation. All collected
and imported terms are pending review. This is intentionally not a drop-in reproduction
of every legacy behavior.

Maintenance previews use short-lived, account- and site-bound confirmation snapshots.
Deletion is limited to a reviewed batch of at most 100 unchanged rows and has no
plugin undo; back up first. Cursor reset is separate and a later import may restore
deleted terms. Settings/widget migration backups and content-change audits are intentionally
retained. Deleting recorded terms does not retract existing post tags, external 
caches, or backups.

The plugin makes no external HTTP requests. It stores a term, destination post ID,
aggregate count, last-seen UTC time, moderation state, and a hash of the term. It
does not store IP addresses, full referral URLs, cookies, or visitor identifiers.
The hash is for deduplication, not anonymization. Terms themselves can contain personal
information. Administrators must update their privacy notice and assess applicable
consent requirements before enabling collection. Requests with Do Not Track or Global
Privacy Control, and logged-in visitors, are excluded.

By default, daily cleanup deletes terms in the new table after the configured last-
seen retention (90 days by default), including approved/imported terms. Expired 
terms are excluded from public lists even before cron runs. The optional unused-
terms policy applies that age limit only to terms with fewer than 10 observations.
Terms with 10 or more observations can then remain indefinitely until manually deleted;
update your privacy notice before changing this policy. The original table is never
modified or deleted. Deactivation and plugin deletion preserve data; remove sensitive
terms while the plugin is active and use your database tools for a complete, backed-
up removal if required.

### Credits

Original project: SEO SearchTerms Tagging 2 v1.535 by Purwedi Kurniawan (poer), 
Copyright 2010-2011. Original category-query credit: pile. The modern implementation
is maintained by fortop. No original-author endorsement is implied. Official original
source: https://plugins.svn.wordpress.org/searchterms-tagging-2/trunk/ . License
interpretation follows the Plugin Directory requirements linked above; this does
not transfer ownership of the old listing.

## Installation

 1. Create a staging copy and back up the database and original plugin.
 2. Deactivate the original SEO SearchTerms Tagging 2, the previous SEO Referral Search
    Term package, and any earlier Referral Search Terms beta on that staging site. 
    Saved data is retained.
 3. Upload this candidate ZIP and activate it on the individual site. Network activation
    is intentionally not supported.
 4. Open Settings > Fortop Referral Search Term. Review retention/privacy and optionally
    import legacy rows, 100 per click.
 5. Review and approve only suitable terms. Add the Search Terms widget or shortcode
    and check your theme.
 6. Enable collection or automatic append only when you deliberately want those behaviors.

Do not activate the old plugin while this candidate is active. Deactivate this candidate
first when rolling back. Re-enable the original plugin to use its unchanged original
table/settings.

## FAQ

### How do I upgrade from the earlier SEO Referral Search Term candidate?

Back up first, deactivate and delete the earlier candidate, then install and activate
this package. Do not run both packages at once. Existing stt2m settings, terms, 
approval state, import cursor, widget placements and shortcodes are retained; only
the package name, directory and text domain change. Existing translations for the
former text domain must be regenerated for fortop-referral-search-term. Deleting
either inactive package preserves the stored data. The new plugin restores a missing
daily cleanup schedule on the next request if removal of an older package cleared
the shared hook.

### Does this plugin show promotions or dashboard-wide notices?

No promotions, upgrade prompts, rating requests or dashboard widgets are included.
Conflict notices appear only on the Plugins screen or this plugin’s settings screen
for administrators with plugin-activation capability. They are dismissible for the
current page view and remain available there while the conflict is unresolved. Action
feedback is confined to the plugin settings screen.

### Can this recover hidden Google search queries?

No. Search engines and browsers commonly omit search terms from referral headers.
No terms can be recovered when they are absent. This is not Search Console and does
not guarantee SEO or traffic improvements. Full-page caching may bypass collection.

### What are the collection limits?

The table has an approximate 50,000-row ceiling, terms are limited to 255 characters,
and capture uses a soft global 60-per-minute throttle. Concurrent requests can exceed
these non-atomic limits. Deduplication ignores ASCII letter case but preserves Unicode
case consistently across hosts. Only standard public posts/pages are supported; 
third-party membership access rules and cached-page purging need separate integration.

### Are referral counts trustworthy analytics?

No. Referrer headers can be forged. Counts are observations without visitor identification,
not unique people or proof of search-engine traffic. The soft global throttle is
not a firewall.

### What is supported by the shortcode?

[stt2_terms mode=”post” limit=”10″ link_mode=”none”]
 Modes: post, popular, recent,
random, category. Optional post_id, category_id, heading, and link_mode (none, post,
search). Only approved terms for public non-password-protected posts/pages or the
home page are displayed. Random chooses from a bounded popular pool rather than 
the entire table.

### Which theme functions remain?

stt_terms_list(), stt_popular_terms($count), stt_recent_terms($count), stt_random_terms(
$count), and stt_popular_terms_in_category($count). They return HTML; echo the returned
string in the theme. Internal pk_stt2_* APIs and old widget IDs are not preserved.

### Does import preserve the original data?

Yes. Import only reads the original stt2_meta table and writes a separate stt2m_terms
table. It sanitizes terms, skips unsupported/private/missing destinations and blocked
phrases, clamps invalid/future dates, and uses idempotent maximum-count updates.
It does not copy old options or widget placements. Imported terms are pending and
subject to current retention; old imports can therefore be immediately hidden/cleaned.
Keep the original backup.

### What changed from the legacy plugin?

The old newsletter/registration/donation integrations are removed. Automatic tagging
and post-date promotion require separate, explicit opt-in. Tagging adds only approved,
currently eligible popular terms, at most five per post and one post per run, no
more often than every 30 days per post. Tagging does not automatically retract tags
when terms are hidden or deleted. Promotion changes publication dates, which can
affect date-based permalinks, feeds, ordering and caches. No recorded referral terms
does not mean no search traffic. Promotion is limited to old eligible posts and 
one post per 12 hours, with a retained date audit. Keep both features off unless
these consequences are intended. Arbitrary custom HTML is not supported; restricted
paired wrappers are optional. Rewrite/search-query rewriting is not implemented.
The installation instructions and feature differences above describe the migration
requirements.

### Is this ready for WordPress.org?

Version 0.1.1 was published in the WordPress.org Plugin Directory. This package 
prepares version 0.2.0; check the directory for its current publication status. 
Listing approval is not a security certification or endorsement. No ownership or
rights in the original plugin listing are transferred.

### What has been tested, and what is outside the verified scope?

Development candidates for 0.2.0 passed 255 assertions on WordPress 7.1.4 with PHP
7.4 and 8.4 using SQLite compatibility, and focused native MariaDB 10.11.19 checks
on PHP 8.3.36. Native checks covered migration, import discovery and replay, synthetic
automation, pending-review defaults and cleanup, and actual admin rendering/handler
methods inside isolated fixtures. The admin checks used a wrapper rather than complete
HTTP admin-post routing. The visual update passed 22 native admin checks; the subsequent
CSS-only polish passed 65 local rendering assertions and desktop browser inspection.
These checkpoints overlap and do not constitute unique-case totals or final-package
certification. The final 0.2.0 package requires its own release checks. Physical/
mobile browser rendering, production integrations, persistent object caches and 
high-load concurrency remain outside this evidence.

Historical 0.1.x evidence follows and must not be treated as new testing of 0.2.0:

Revision 0.1.1 (November 14, 2026) passed 149 assertions per matrix on WordPress
7.1.4/PHP 8.3.36, WordPress 7.1.4/PHP 8.4.27 and WordPress 6.5.14/PHP 7.4.33 in 
Playground with SQLite compatibility. Coverage includes syntax, activation, capture/
privacy, moderation, storage limits, pagination, restricted/dismissible notices,
prior-package guards and cleanup schedule restoration. Debug logs were empty. An
additional old-0.1.0-to-new-0.1.1 upgrade scenario passed eight assertions covering
retained terms/settings/import cursor/widget data, shortcode and cleanup recovery.
Plugin Check 2.2.0 executed all 36 checks with zero errors/warnings; the previously
documented narrowly scoped exceptions remain in place. These are automated tests,
not WordPress.org approval. Native MariaDB and browser layout testing have not been
rerun for 0.1.1.

Historical evidence for the earlier release follows, not a claim of new native testing:

Release 0.1.0 passed 136 assertions on each of WordPress 7.1.4/PHP 8.3.36, WordPress
7.1.4/PHP 8.4.27, and WordPress 6.5.14/PHP 7.4.33 using Playground with SQLite compatibility,
without PHP errors or debug-log output. All 36 Plugin Check 2.2.0 checks ran: the
annotated release reported zero errors/warnings; an independent control without 
the new exact-line exceptions reported the original 32 warnings. These are reviewed
exceptions, not 32 bug fixes. PHP token comparison against beta.4 found only the
version constant changed.

The beta.4 baseline also passed 67 native staging assertions on WordPress 7.1.4/
PHP 8.3.36/MariaDB 10.11.19, a separate persistent synthetic import and fresh-process
verification (26 and 19 assertions with overlapping coverage), a small six-increment
concurrency check, and responsive browser previews with Twenty Twenty-Five.

The installed 0.1.0 release then passed a native persistent-import check on the 
same stack: 2 precondition assertions, 41 run assertions, and 19 fresh-process verification
assertions, all with exit code zero and no errors in their logs. These stages overlap
and are not a sum of unique cases. Actual import batches processed 100 rows, then
9, then an empty batch; the persistent cursor was 109. Original source rows were
preserved. The existing importer intentionally renormalized one synthetic future-
date fixture when reimported; this was verified, not treated as byte-unchanged target
data. Anonymous staging checks showed the approved demo term and excluded pending
batch terms. All eight installed plugin files matched the tested package before 
this documentation-only update; PHP files remain unchanged. These results are not
a certification of every supported version or host.

Only standard public, non-password-protected posts/pages and the home page are supported.
Network activation is not supported. Native MySQL, other native PHP versions, production
migrations, high-load races, FlexMag/other production themes, AMP, physical mobile
devices, third-party membership restrictions, and page/persistent-object-cache integrations
remain unverified. Full-page caches can bypass collection and retain old public 
output after moderation or visibility changes; the site operator must arrange cache
purging. No term-result cache is added by this plugin. Stage-test the actual deployment
before production use.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Fortop Referral Search Term” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ fortop ](https://profiles.wordpress.org/fortop/)

[Translate “Fortop Referral Search Term” into your language.](https://translate.wordpress.org/projects/wp-plugins/fortop-referral-search-term)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/fortop-referral-search-term/),
check out the [SVN repository](https://plugins.svn.wordpress.org/fortop-referral-search-term/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/fortop-referral-search-term/)
by [RSS](https://plugins.trac.wordpress.org/log/fortop-referral-search-term/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.2.0

 * Add a classic two-column admin layout, compact wrapper controls, section navigation
   and approved-term sidebar summaries, with clearer typography and responsive CSS.
 * Add restricted legacy-style wrappers and an optional unused-term retention policy;
   keep existing cleanup defaults and explicit privacy warnings.
 * Add previewed settings/classic-widget migration, backups and guarded widget rollback
   without changing original source data.
 * Add separately authorized, OFF-by-default tagging and date promotion with permission
   checks and retained audits.
 * Add preview-bound, confirmed maintenance batches, changed-row protection and 
   a separate import-cursor reset.
 * Preserve moderation, nonce/capability checks, escaped output and data retention
   on uninstall. See the testing-scope section for validation limits.

#### 0.1.1

 * Renamed to Fortop Referral Search Term with the fortop-referral-search-term slug
   and text domain.
 * Limited conflict notices to the Plugins and plugin settings screens for users
   who can activate plugins. Notices are dismissible; moderation/import feedback
   remains on the plugin settings screen only.
 * Added automatic restoration of a missing shared cleanup schedule after removal
   of an earlier package.
 * Added a load-order-safe guard against the previous SEO Referral Search Term package.
   Storage keys, tables, import cursor, widget ID and shortcode remain unchanged.

#### 0.1.0

 * Prepared the initial release for submission review; directory approval is not
   claimed.
 * Documented all 32 Plugin Check warnings with exact-line exceptions for custom
   validation, prepared custom-table operations, fresh-state reads/writes, and five
   guarded legacy template aliases. These are reviewed exceptions, not 32 bug fixes.
 * Updated verified testing scope and remaining deployment limitations without changing
   collection, storage, moderation, import, display, or data-preservation behavior.

#### 0.1.0-beta.4

 * Avoid duplicate Settings API notices on the standard WordPress Settings screen;
   keep moderation/import notices unchanged.

#### 0.1.0-beta.3

 * Development modifications dated November 10, 2026; modification notices retained
   in source headers.
 * Use the unique term/post index before counting rows, so repeat captures/reimports
   avoid a full-table count.
 * Use one look-ahead row for admin pagination instead of a total-count query.
 * Fail closed when a storage admission query errors.
 * Saturate hit counts with a conditional expression that avoids an overflowing 
   intermediate on SQLite compatibility runtimes.
 * Keep moderation, retention, visibility, and capacity queries fresh; no cross-
   request term cache was added.

#### 0.1.0-beta.2

 * Adopted the final maintainer-selected name Fortop Referral Search Term and matching
   text domain.
 * Added the GPLv2-or-later license declaration and full license text based on the
   official directory fallback rule.
 * Clarified appropriate navigation/analysis use and prohibited keyword-stuffing/
   ranking-manipulation use.
 * Kept original attribution and excluded historical screenshots from the installable
   package.
 * Guarded against class collisions with the earlier private beta after the slug
   change.

#### 0.1.0-beta.1

 * Reimplemented local collection, storage, display, moderation, import, and widgets
   using modern WordPress APIs.
 * Added explicit privacy-safe defaults, strict host/parameter checks, prepared 
   SQL, escaped output, and capability/nonces.
 * Preserved original data; provided public template compatibility and manual tagging.
 * Added bounded random queries, retention filtering, strict date validation, and
   future-date clamping.
 * Removed external registration, automatic tagging/republication, legacy rewrites,
   and arbitrary HTML wrappers.

## Meta

 *  Version **0.2.0**
 *  Last updated **10 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.5 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [analytics](https://wordpress.org/plugins/tags/analytics/)[moderation](https://wordpress.org/plugins/tags/moderation/)
   [referral](https://wordpress.org/plugins/tags/referral/)[Search Terms](https://wordpress.org/plugins/tags/search-terms/)
   [widget](https://wordpress.org/plugins/tags/widget/)
 *  [Advanced View](https://wordpress.org/plugins/fortop-referral-search-term/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/fortop-referral-search-term/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/fortop-referral-search-term/reviews/)

## Contributors

 *   [ fortop ](https://profiles.wordpress.org/fortop/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/fortop-referral-search-term/)