WPIntell

Source evidence

JavaScript global namespace pollution

Big File Uploads – Increase Maximum File Upload Size · support · 2022-09-26T19:37:00+00:00

complaintsentiment
mediumseverity
0.75relevance
0replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

4 / 17 rows with source links

23.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

13 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
ibugone unresolved
This plugin interferes with WP PDF Embedder in the Gutenberg editor and causes that plugin to show “Your site doesn’t include support for the PDF Embedder block”. I identified the cause to be a JavaScript variable defined on the first line of assets/js/block-notice.js , while the other plugin also defines var __ = wp.i18n.__ . Since both plugins define this variable only for internal use, putting the definition at JS file level causes a global namespace pollution . One possible solution is to wrap the whole script inside a self-executing function , or better yet, since it’s only used once, remove the variable definition and use the full namespaced path (i.e. wp.i18n.__(...) ). I have already contacted the developers of the other plugin, but it would certainly be nice if this can be fixed on both sides. Namespace pollution is known as a bad practice and makes plugins susceptible to conflicts.

Comments

0 shown

No comments were stored for this source.