Changelog

Every release of the plugin and what changed in it. The same list is on WordPress.org.

1.6.1

Features

  • The dashboard widget is redesigned. For the last 7 days it shows the searches, the searches with no results and the unique terms compared with the 7 days before, the last search, a bar per day, the trending terms, the top searches and the top searches with no results. It also shows the busiest day and time of the last 4 weeks
  • The new “When people search” chart on the statistics page shows the searches of the last 4 weeks by day of the week and 4-hour interval. It follows the “Show results dates as UTC” setting
  • New Popular Searches and Latest Searches blocks show the same lists as the [mwtsa_display_search_stats] and [mwtsa_display_latest_searches] shortcodes, with the same settings and a live preview in the editor. Pasted shortcodes and Shortcode blocks can be turned into them. The blocks need WordPress 5.6 or later
  • The shortcodes and blocks can link each term to its search results, with link_terms="true" in the shortcodes and by default in the blocks. Searches opened from those links are only recorded if you turn that on, with count_link_clicks="true" or the setting in the blocks
  • The text above the lists can be left out, with show_label="false" in the shortcodes and a setting in the blocks
  • Searches made by bots are no longer recorded. Crawlers, AI assistants, link previews, monitoring tools and scripts are recognized by their user agent. Searches that contain a link or HTML, or that are longer than 100 characters, are skipped as junk. Both checks are on by default and have a setting

Bugfixes

  • The time filters, the shortcodes and the dashboard widget failed on SQLite databases, such as the one WordPress Playground uses for the Live Preview
  • The “Your Last Searches” list of the [mwtsa_display_search_stats] shortcode showed the terms the visitor searched most often instead of the latest ones
  • A live search whose requests the plugin records, such as FiboSearch or a custom live search with its parameter listed in the settings, stored a search for every few keystrokes. Successive requests from the same visitor are now merged into one search, and the results page that follows is not counted again

Optimizations

  • Statistics for the time filters are cached for up to a minute, and old cache entries expire after an hour
  • The [mwtsa_display_search_stats] shortcode only loads the terms it shows, instead of every term searched in the period

Others

  • After at least a week of use, the statistics and settings pages show a notice asking for a review. It appears once, and you can dismiss it for good
  • The Search Analytics admin menu item uses the plugin’s new icon instead of a generic chart icon

1.6.0

Structure

  • Search data is now only removed when the plugin is deleted and the setting is checked, never on deactivation. The setting is now called “Delete all search data and settings when the plugin is deleted”
  • The minimum WordPress version is now 4.7 (1.5.0 already needed it)

Features

  • The country lookup can use ip2c.org (HTTPS, IPv4 only) instead of ip-api.com. Choose it under “Country lookup service”; ip-api.com stays the default
  • The new mwtsa_process_search_term() function records searches from your own code, such as an AJAX live search, with the same checks as a normal search

Bugfixes

  • The statistics charts were not loading since 1.5.0
  • The charts and the “By date” view grouped searches by day of the month, merging e.g. 26 August with 26 September. Comparison periods overlapped by a day and the charts showed an extra day
  • On multisite, deactivating the plugin on one site with “Remove plugin tables on deactivate” checked removed the search data of every site in the network. New sites now get their tables reliably, and deleting a site removes its search data
  • A trailing comma in “Exclude search in case it contains certain substring” excluded every search. Matching now also works for non-English text
  • “Last 24 hours”, “Last week” and “Last month” now cover exactly that period instead of starting at midnight
  • Loading the second page of search results or the search feed no longer counts as a new search
  • Terms with leading or repeated spaces, or longer than 100 characters, got a new row on every search
  • The minimum characters setting now counts characters instead of bytes
  • The CSV export headers were wrong in the “No Group” view
  • Saving the settings reset the chart defaults
  • Deleting terms, and the old Dashboard and Settings menu entries, left a half-rendered page instead of redirecting
  • The roles allowed on the settings page could not save it, and the roles allowed on the statistics page could not export
  • The erase confirmation was skipped in translations containing an apostrophe

Security

  • CSV exports no longer let search terms run as spreadsheet formulas
  • The tracking cookie is validated (a malformed cookie made every request fail) and is now HttpOnly and SameSite
  • Every action now checks the user’s role, including the chart requests and erasing the history

Optimizations

  • Countries are shown with flag emoji instead of 249 bundled flag images (about 1 MB). Browsers that can’t draw flag emoji, such as Chrome and Edge on Windows, load a small flag font bundled with the plugin
  • Added database indexes to the search history and search terms tables. Database upgrades now run from the admin, never during a visitor’s search
  • The country lookup only runs for recorded searches, is cached per IP for a day and times out after 2 seconds
  • The tracking cookie is no longer re-sent on every page, which kept pages out of full-page caches
  • Searches through the REST API are counted without loading every matching post
  • The plugin’s stylesheet only loads on its own screens

Deprecations

  • The mwtsa_stats_table_* and mwtsa_term_stats_table_* filters are deprecated. Search Analytics 2.0 replaces the statistics screens and they will no longer run there

1.5.0

  • Structure: Changed the main page from wp-admin/index.php?page=search-analytics%2Fadmin%2Fincludes%2Fclass.stats.php to wp-admin/admin.php?page=mwtsa-search-analytics. A proper redirect was added to the old route
  • Structure: Changed the settings page from wp-admin/options-general.php?page=search-analytics to wp-admin/admin.php?page=mwtsa-search-analytics-settings. A proper redirect was added to the old route
  • Structure: Added a new way to access the plugin main page as a section on the sidebar.
  • Bugfix: Fix a possible crash in case ip-api.com did not return a valid response
  • Bugfix: Fix potential IP spoofing when running a search with save country on
  • Feature: Added mwtsa_run_terms_history_data_query_args filter for changing the args before history data gets queried
  • Feature: Added a link to the statistics page on the dashboard widget
  • Optimization: Security improvements and general code optimization. Fixed Cross-Site Request Forgery (CSRF) vulnerability
  • Optimization: Performance improvements
  • Optimization: Added the select2 and jQuery UI Smoothness theme as assets in the plugin
  • Optimization: Deprecated the global $mwtsa. It will be removed in a later version. Use the MWTSAI() to get the instance
  • Deprecations: Deprecated the helper functions with mwt_ prefix and renamed them to the proper prefix mwtsa_ to prevent possible collisions
  • Deprecations: Deprecated the mwtsa_run_terms_history_data_query filter. It could be used by bad actors to modify the query and pass a not sanitized query through

1.4.16

  • Bugfix: Fix bug related to exclude keywords setting, reported here. Thank you @luislu for the report!

1.4.15

  • Bugfix: Fix country not being saved, reported here. Thank you @mikeeiler for the report!

1.4.14

  • Bugfix: Fix bulk deletion not working.

1.4.13

  • Optimization: Security improvements and general code optimization.

1.4.12

  • Others: Rename plugin to “Search Analytics for WP”

1.4.11

  • Optimization: Security improvements and general code optimization. Fixed Reflected Cross-Site Scripting vulnerability reported by vgo0

1.4.10

  • Optimization: Security improvements and general code optimization. Fixed Broken Access Control vulnerability reported by Abdi Pranata. Thank you for the responsible disclosure!
  • Optimization: Compatibility with WP 6.6.x

1.4.9

  • Bugfix: Fixed warnings showing on specific combination of filters and grouping. Reported here. Thank you @sadesades for the detailed report!

1.4.8

  • Optimization: (ENCORE) Security improvements and general code optimization. Fixed this vulnerability
  • Optimization: adjust some translations

1.4.7

  • Optimization: Security improvements and general code optimization. Fixed this vulnerability

1.4.6

  • Optimization: Security improvements and general code optimization. Fixed this vulnerability
  • Bugfix: Charts not working after changing interval or chart type

1.4.5

  • Bugfix: Fix PHP Compatibility issue: PHP 5.6 - 7.2

1.4.4

  • Bugfix: Date filters not working if the browser is set in a language different from English
  • Feature: Add setting: “Show results dates as UTC”, default: true
  • Feature: Make dates in the results list show as UTC by default.
  • Feature: Add 6 more filters and 2 actions for developers to be able to extend the plugin. An overview post will be published here: Search Analytics for WP: Filters Reference
  • Optimization: Security improvements and general code optimization
  • Optimization: Updates to the settings page
  • Deprecations: Deprecated the mwt_wp_date_format_to_js_datepicker_format() helper function

1.4.3

  • Bugfix: Make sure that shortcode mwtsa_display_latest_searches displays unique terms
  • Feature: Add more parameters to some filters. An overview post will be published here: Search Analytics for WP: Filters Reference

1.4.2 Hotfix

  • Bugfix: fix default filters in the results view

1.4.1

  • Feature: Add shortcode mwtsa_display_latest_searches for displaying the latest searches on the frontend of the website
  • Feature: Add 3 more filters for developers to be able to extend the plugin. An overview post will be published here: Search Analytics for WP: Filters Reference
  • Optimization: Security improvements and general code optimization
  • Others: Add link to the complete changelog

1.4.0

  • Feature: Add REST API search support
  • Feature: Add 9 filters for developers to be able to extend the plugin. An overview post will be published here: Search Analytics for WP: Filters Reference
  • Optimization: Add the search term to the mwtsa_extra_exclude_conditions filter
  • Optimization: Check for minimum PHP and WP versions when activating the plugin
  • Optimization: Compatibility with WP versions up to 6.0.1
  • Optimization: Compatibility with PHP v8.1
  • Optimization: Security improvements and general code optimization
  • Bugfix: Fix styling on WP 4.4.0 - 4.9.20
  • Bugfix: Fix broken settings page URL from the results page
  • Others: Rename the plugin to “WP Search Analytics”

1.3.6

  • Bugfix: Users can not see the statistics page in some cases. Bug report
  • Bugfix: Database error on term delete success page
  • Optimization: Compatibility with WP versions up to 5.8
  • Optimization: Compatibility with PHP versions between 5.6 - 8.0
  • Optimization: Security improvements and general code optimization
  • Optimization: Remove filters and groups on the term delete success page
  • Others: Add more “Useful Links”
  • Others: Add quick rate tool

1.3.5

  • Bugfix: Fix dates filter not allowing you to select the current day in certain timezones
  • Bugfix: Deleting multiple entries with the bulk action would trigger 2 notices
  • Feature: Add support for WpForo
  • Feature: Add mwtsa_export_filename filter to allow control over the filename generated when exporting data
  • Feature: Add shortcode mwtsa_display_search_stats for displaying search statistics on the frontend of the website
  • Optimization: Prepare the plugin for community translation
  • Optimization: Security improvements and general code optimization

1.3.4 Hotfix

  • Bugfix: Fix fatal error for missing wp_timezone() in WP < 5.3.0

1.3.3

  • Bugfix: Times displayed in UTC time instead of the website’s timezone
  • Feature: allow filtering searches by user
  • Experimental Feature: prevent terms from being saved if they contain certain substrings
  • Experimental Feature: allow the plugin to capture search strings from custom search parameters
  • Optimization: hook load_plugin_textdomain on the init action instead of the plugins_loaded one
  • Optimization: prefix helper functions create_date_range and get_current_user_ip with mwt_ to avoid eventual naming conflicts

1.3.2

  • Bugfix: “Only display the statistics and settings page for these user roles” not working correctly
  • Bugfix: Fix missing script error if charts disabled
  • Bugfix: Add prefix to the option setting group to prevent conflicts
  • Bugfix: Database error if search-term URL param is empty
  • Feature: Split the “Only display the statistics and settings page for these user roles” in 2 different settings
  • Optimization: compatibility with WP versions up to 5.4
  • Optimization: Add prefix to the option setting group to prevent conflicts
  • Optimization: Review and patch the plugin from a security perspective
  • Optimization: Made sure administrator display rights can not be taken away by making the field disabled

1.3.1 Hotfix

  • Bugfix: database not being updated correctly in case of plugin update. It only worked for manual plugin activation
  • Bugfix: search country locked to Canada.

1.3.0

  • Feature: add save_search_term() method to allow external search saving
  • Feature: add mwtsa_extra_exclude_conditions filter to allow more control over the conditions in which a search is processed
  • Feature: add mwtsa_exclude_term filter to allow more control over the conditions in which terms are saved
  • Feature: save searches by user so the user can see his search history
  • Feature: add country geolocation for the searches
  • Feature: add more options for the chart
  • Feature: add period comparison in the chart
  • Optimization: compatibility with version 5.2.2
  • Optimization: Add multisite support
  • Optimization: Build separate methods for displaying charts to be able to easily integrate it in other views
  • Optimization: Make chart include “today”
  • Optimization: general code optimizations
  • Optimization: general code optimizations

1.2.3

  • Feature: add ability to delete all search history older than a selected number of days
  • Feature: add setting: “Exclude searches from IPs list”
  • Feature: add setting: “Only record searches with at least the number of characters”
  • Feature: add “Ungroup” view for the list of terms for having a chronological data view
  • Optimization: compatibility with version 5.1
  • Optimization: change default sort to last search date
  • Optimization: average number of results column to only 2 decimals
  • Optimization: update the singleton pattern

1.2.2

  • Bugfix: fix bug in the database version update
  • Bugfix: “By Hour” group is not working correctly
  • Bugfix: “Hide graphical charts” setting not working correctly
  • Feature: Add a setting for using a cookie for previously logged in user for not counting searches made by users having a user role in the excluded roles list
  • Feature: Add a setting for not counting duplicate searches over a period of time
  • Feature: add role visibility for the dashboard widget
  • Optimization: update the way Group By works on the term details view
  • Optimization: use function_exists() and class_exists() for all function/class declarations
  • Optimization: add javascript graph compatibility with older IE versions
  • Optimization: show fewer points on the Y axis on the graphical chart if search count gets high

1.2.1

  • Bugfix: fix “Unknown column ‘average_posts’ in ‘where clause’” error on single term view ( introduced in v1.2.0 )
  • Bugfix: remove bulk actions on single term view ( introduced in v1.2.0 )
  • Bugfix: fix “Last 24 hours” time filter ( introduced in v1.2.0 )
  • Feature: add admin dashboard widget with last week stats
  • Feature: add possibility to group single term view results by day and hour
  • Feature: add charts for graphical data representation
  • Optimization: add link on searched term for faster navigation
  • Optimization: make custom views and filters language variables ( introduced in v1.2.0 )
  • Optimization: make all date and time columns use WP date and time format settings
  • Optimization: code updates to better comply to the WP coding standards

1.2.0

  • Bugfix: fix PHP notice on the settings page ( introduced in v1.0.3 )
  • Bugfix: fix search resetting time and result filters ( introduced in v1.1.2 )
  • Bugfix: fix notice “Undefined index: date_from” ( introduced in v1.1.2 )
  • Bugfix: fix notice “Undefined index: date_to” ( introduced in v1.1.2 )
  • Feature: ability to download history in a CSV file
  • Feature: add single term view with detailed search historical stats
  • Feature: ability to choose which user roles can see the search history stats
  • Optimization: set table names in plugin constants for cleaner calls
  • Optimization: move history data return from db function to independent static class.
  • Optimization: change time filter default to “All Time”

1.1.3

  • Bugfix: fix jquery.ui load over https ( introduced in v1.1.2 )

1.1.2

  • Bugfix: make stats page full responsive ( introduced in v1.1 )
  • Feature: add filters: all, only successful, only unsuccessful ( 0 posts ) results
  • Feature: Time range filters
  • Optimization: make bulk action “Delete” use language variable ( introduced in v1.1.1 )
  • Optimization: add screen option to allow selection of number of results per page
  • Optimization: last search date - sortable column
  • Optimization: add “clear” option to the date pickers
  • Optimization: add 2 months view on the calendars

1.1.1

  • Bugfix: remove limit of results on the table ( introduced in v1.1 )
  • Feature: ability to delete terms from the results
  • Feature: bulk terms delete action
  • Optimization: results per page reduced from 30 to 20

1.1

  • Bugfix: exclude empty search strings ( introduced in v1.0 )
  • Design: display tables using the Wordpress Admin Tables
  • Feature: pagination for better data analysis
  • Feature: custom sorting on all columns
  • Feature: filter results by string

1.0.4

  • fix a warning occurring in certain cases on search

1.0.3

  • Add ability to delete all history
  • Add ability to remove the tables on plugin deactivate
  • Stats page restyling

1.0.2

  • Update results sorting for better viewing the data
  • Minimum styling on the stats page
  • Add link to the settings page

1.0.1

  • Fix deprecated notice

1.0

  • Initial Release