# Codlino Statistics 0.2.0

Version 0.2.0 refreshes the logo with a framed, ascending analytics trace. It uses Codlino Pixel's forest green #245747 and white. The trace draws in place during a five-second single-play animation, then stays complete. Existing refresh replay and reduced-motion behavior remain. The separate WordPress.org asset package supplies two animated icon sizes and 772x250 / 1544x500 banner PNGs in the Codlino family style. Directory artwork is not bundled in the installable plugin ZIP.

Version 0.1.9 addresses the WordPress.org review by removing assets/icon-256x256.png, an unused directory-only icon, from the installable plugin. No directory banners, screenshots or icon-size exports are bundled. The animated icon-motion.gif and static icon.svg remain because the administration menu, dashboard and reduced-motion stylesheet actively use them. The separate WordPress.org directory-asset packages remain outside the installable ZIP for publication through SVN after approval. Analytics behavior, preferences and the five-second logo animation are unchanged.

Version 0.1.8 replaces the looping animation with a five-second, single-play GIF. The ring rotates about its own center and the separate chart segment rotates about its own center, both clockwise. The green tile stays still. Both return to the original pose and stop after four turns. The GIF has 125 frames at 25fps and no loop extension. A per-document playback identifier restarts the local animation on refresh; the menu and dashboard share the same playback URL within a document. Reduced-motion preferences still use the static SVG. The separate single-play directory-assets ZIP contains the corresponding WordPress.org GIF files. Playback there is controlled by the directory/browser, not by plugin PHP.

Version 0.1.7 adds a 32-frame animated GIF logo, rotating only the white analytics mark once every 1.28 seconds (25 frames per second). The dashboard and administration menu use the local GIF; a small local stylesheet uses the static SVG when prefers-reduced-motion is enabled. No external services are contacted. The separate motion directory-assets ZIP contains correctly named 128px and 256px GIF icons for the WordPress.org SVN assets directory. See its upload instructions about replacing existing static icons.

Version 0.1.6 adds a vector logo using Codlino Pixel's forest green (#245747) and white, with a distinct circular analytics symbol. The local SVG is used in the dashboard header and the WordPress administration sidebar. WordPress.org directory icons are provided separately in the accompanying directory-assets package; publish those in the repository's top-level assets directory after approval.

Install the ZIP through WordPress → Plugins → Add New → Upload Plugin, activate it, then open Codlino Statistics in the admin sidebar. Requires WordPress 6.3+ and PHP 7.4+. Single-site installation; network-wide activation is not supported.

Includes daily page views, the sum of daily unique visitor estimates, Today / Yesterday / 7 days / 30 days / 90 days / 1 year reports, top ten pages, referring domains, device breakdown, daily CSV exports and configurable 7–365-day retention. Starts collecting after activation; no historical visits are imported. Deactivation preserves data. Deleting the plugin removes all its data.

The dashboard header is compact. Selecting Arabic, English or French saves the language immediately, without an Apply button. A fallback button appears only when JavaScript is disabled. Language preferences are saved per administrator, and changing language preserves the selected reporting period.

Today and Yesterday use your WordPress website timezone. Yesterday includes only the previous calendar day. One year means the most recent 365 calendar days, including today. Its chart groups page views by calendar month within that interval; the CSV still exports daily totals. All reports, tables and exports use the same inclusive start and end dates. The Views today card always shows today's total independently of the selected period.

New installations keep data for 365 days by default. Existing installations preserve their chosen retention. Set retention to 365 days to build a full year of history going forward; previously deleted or uncollected visits cannot be recovered.

The tracker runs in the visitor's browser and works with cached pages after clearing the page cache following activation or settings changes. Logged-in users are excluded. Common bots, Do Not Track and Global Privacy Control are excluded. Ad blockers, disabled JavaScript, blocked REST requests or browsers that suppress origin headers may prevent collection. This is a lightweight first version, not a full clone of WP Statistics. Geography, live sessions, search keywords and advanced bot detection are not included.

No cookies, raw IP addresses, full referring URLs or query strings are stored. A daily HMAC of connection IP and user agent estimates visitors. People sharing an address/browser may be grouped; people changing either may be counted again. The period visitor card sums daily visitors, so a returning person can count on several days. The endpoint accepts anonymous events; origin checks and brief per-visitor throttling reduce accidental traffic, but cannot authenticate genuine humans. Avoid this initial version for billing or very high-volume sites.

## Consent integration

Enable “Require consent before tracking” if your consent flow requires it. Connect your banner to:

```js
// Only after the visitor grants analytics consent:
window.codlinoConsent = true;
window.dispatchEvent(new CustomEvent('codlino:consent', { detail: true }));
// When consent is revoked:
window.codlinoConsent = false;
window.dispatchEvent(new CustomEvent('codlino:consent', { detail: false }));
```

On each new page, restore the granted state through your consent manager. Codlino does not create a consent banner or persist consent itself. One view is sent per full page load. Retention is enforced daily through WordPress cron, which depends on site traffic, and immediately when settings are saved.

## Verification before production

Install on staging; open a public page in a logged-out browser, then check the view count and page path. Check the CSV, consent mode, disabled tracking and retention. No visits should appear while logged in or with Do Not Track enabled. Version 0.1.5 passed local WordPress 7.1.3 runtime checks on PHP 8.5.11 using the SQLite integration adapter. MySQL hosting and your site's other plugins still require staging verification.

Developer references: https://developer.wordpress.org/reference/functions/register_rest_route/ and https://developer.wordpress.org/reference/functions/wp_enqueue_script/

License: GPL-2.0-or-later.

## Version 0.1.3 — Language switch fix

Language changes now submit to the same authenticated dashboard page instead of admin-post.php. Each form has a distinct security-token field; the language handler verifies its own POST token with WordPress's nonce API, checks administrator permission and validates the three supported languages. The dashboard sends no-cache headers. Expired tokens return to a fresh dashboard with a translated retry message; they never save a language without valid authorization. The reporting period is preserved.

Regression checks passed using WordPress 6.8's actual nonce functions: all three languages, conflicting request tokens, expired tokens, incorrect actions, different login sessions, invalid languages and unauthorized users. Full installation testing on the affected site is still needed to confirm compatibility with its caching and security configuration.

Upload codlino-statistics-0.1.5.zip and choose to replace the installed plugin. Keep the existing plugin directory and data; do not uninstall it first. After replacement, reopen the dashboard before changing languages so it generates a fresh form.

Version 0.1.4 checks: date bounds for all six reporting periods, timezone behavior, leap days, daylight saving changes, monthly aggregation and retention of the selected period during language changes. Browser checks covered all three languages, desktop and mobile layouts, compact header height, automatic language submission with its security token and the Today / Yesterday / 1 year charts.

Build validation: all PHP files passed PHP syntax checks. The actual dashboard template was rendered with fixture data in English, French and Arabic, plus an empty-data state. Desktop (1440px) and mobile (390px) checks passed for horizontal overflow, language controls, version display, direction and keyboard chart tooltips. Browser tracker checks passed. Previously supplied dashboard screenshots use example data.

## Version 0.1.5 — Directory preparation

Adds WordPress.org readme.txt metadata for contributor tahabelmezrar and the full GPLv2 license. SQL table identifiers now use wpdb identifier placeholders. Request values are unslashed and sanitized, error messages escaped, dashboard reports cached and invalidated after data changes, template variables prefixed and source line endings normalized.

Plugin Check 2.1.0 completed its default available checks with no reported errors or warnings. Narrow PHPCS annotations document the necessary custom-table operations, read-only report/status parameters, delegated nonce verification and the standard DONOTCACHEPAGE interoperability constant. They do not exempt input/output escaping or SQL preparation.

Real WordPress runtime checks passed for activation/table access, all three language writes with actual core nonces, invalid nonce rejection, six dashboard periods, REST event persistence, privacy fields, report cache invalidation, invalid origin/path rejection and retention cleanup. Passing automated checks does not guarantee directory approval; WordPress.org conducts its own manual review.

## Version 0.1.2

Powered by Taha Belmezrar. Refreshed dashboard with Codlino's Midnight Ink, Aurora Teal and Warm Copper palette; responsive cards, coordinated controls, styled tables and accessible daily chart labels. Arabic uses a right-to-left interface; page paths and chart chronology stay left-to-right. CSV headings follow the chosen language and include a UTF-8 marker for spreadsheet compatibility.

All versions use the same codlino-statistics folder and database table, preserving analytics during replacement upgrades.
