Repository navigation
Name every screen PostHog runs on in the readme's External Services entry - #2212
subodhr258 wants to merge 3 commits into
Conversation
After an admin allows it, PostHog also loads on the Media Library and Edit Media screens, the editors for every post type, the site editor and the widgets screen, not only on GoDAM's own admin screens. The entry now says so, says the replays cover the whole screen, and lists the browser and device details PostHog's code collects.
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
mismatched_plugin_name | Plugin name "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" is different from the name declared in plugin header "GoDAM". |
0 |
trademarked_term | The plugin name includes a restricted term. Your chosen plugin name - "GoDAM - Organize WordPress Media Library & File Manager with Unlimited Folders for Images, Videos & more" - contains the restricted term "wordpress" which cannot be used at all in your plugin name. |
📁 assets/build/css/main.css (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedStylesScope | This style is being loaded in all contexts. |
📁 assets/src/libs/analytics.min.js (5 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/10/21/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
📁 assets/build/js/main.min.js (5 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/10/21/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
Code reviewVerdict: LGTM — the reworded PostHog entry is accurate. I checked the screen list against the code and it maps exactly to the enqueue gate:
Good calls on widening "post and page editors" to "other post types" (base Two things worth a look, neither blocking the wording: 1. Elementor/WPBakery: the code comment and your testing disagree
2. Who owns the
|
The page no longer sends the signed-in viewer's email (#2213), and readme.txt already dropped it; README.md still listed it. Addresses review: #2213 (comment) Addresses review: #2212 (comment)
|
Thanks Kuldip.
|
README.md had no PostHog row. The table now lists it the way readme.txt does.
|
Thanks for checking both. I looked at each against the code. 1. Elementor and WPBakery. You are right that the comment above 2. README.md. That one was meant for the readme PRs: #2213 left the README.md table to them. The "Email" removal from the analytics.godam.io row is already on this branch (44b75e9). README.md had no PostHog row at all, so I added one that mirrors the readme.txt entry (e786ec0). If you would rather keep this PR to Also noted in the description: rtCamp/godam.io#1033 says "the post and page editors" and does not name Edit Media, so it should be widened to match this readme before it is published. |
Review packet
In one line: Updates the PostHog entry in the readme's External Services section so it names every screen PostHog runs on once an admin allows it, not only GoDAM's own screens. Fixes no issue.
1. Criteria and proof
godam_is_media_library_screen()(inc/helpers/custom-functions.php) lists the screen basesupload,post,page,attachment,widgetsandsite-editor, andadmin_enqueue_scripts()ininc/classes/class-pages.phpgives themedia-library-reactbundleposthogConfigon exactly those screensposthogConfigis only set insideadmin_enqueue_scripts2. Before and after
Nothing changes on screen in the plugin. The listing changes when the plugin release deploys
readme.txtto wordpress.org.Unchanged: the list of site details (item 1), the address and browser-stored ID (item 4), the opt-in rule, how to turn it off and the note about us-assets.i.posthog.com.
3. Tests
pages/utils/posthog.jsstarts PostHog as soon as themedia-library-reactbundle loads on any of the screens above.4. Risk flags
No risk flags fired on #2212. Nothing in the diff touched the watched areas.
5. Independent review
A separate review pass saw only the task and
git diff origin/develop...HEAD, read the code and returned the findings below. I checked each against the code.post, which is every post type (products and other custom post types), andattachment(Edit Media) is in the list too$browser,$os,$screen_width,$timezoneand$referrerus.i.posthog.comapi host it loads its remote config (/array/<key>/config) and scripts fromus-assets.i.posthog.com. Left unchangedmanage_optionsand set both flags), the opt-in default off, "connecting an API key does not switch it on" (only the notice handler, the settings REST route and the 2.4.0 consent-reset migration write the setting), "never sent for visitors", "stops from the next page load"Also found: the reviewer grepped the Elementor editor and found no PostHog load there; I left Elementor out of the entry (see section 6).
6. Not verified
tests/php/PostHog*Test.php) were not run (no code changed).admin_enqueue_scripts(inc/classes/class-pages.php). Elementor's editor builds its own page fromwp_headandwp_footerand never firesadmin_enqueue_scripts, and GoDAM'selementor/editor/before_enqueue_scriptshook enqueues only the widget scripts. So PostHog does not load there, and the entry does not name Elementor. WPBakery's backend editor runs inside the normal post screen, so PostHog does load there, and "the editors for posts, pages and other post types" covers it. The comment abovegodam_is_media_library_screen()says basepost/pagealso covers the Elementor editor; that is not right for Elementor and is not in a file this PR owns.godam_should_load_media_library_assetsfilter lets site code add screens. Nothing in this repo uses it, so the entry does not mention it.7. Scope
readme.txt: the PostHog entry of== External Services ==, and nothing else in that file. No changelog line and no version change (the version-bump PR writes the changelog).README.md: one new row in its External Services table that mirrors the PostHog entry (the table had no PostHog row). The row that listed Email as sent to analytics.godam.io was fixed separately in 44b75e9, which is also on this branch.