10% puchi-ab-testing

Code Review | Puchi A/B Testing

WordPress plugin Puchi A/B Testing scored 10% from 54 tests.

About plugin

  • Plugin page: puchi-ab-testing
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.3-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 25, 2019
  • Latest release: Sep 25, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: bayuidham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 607 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/puchi-ab-testing/includes/libs/Medoo.php+292
    implode(): Passing glue string after array is deprecated. Swap the parameters

Server metrics [RAM: ▼1.42MB] [CPU: ▼49.91ms] Passed 4 tests

Server-side resources used by Puchi A/B Testing
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.56 ▼0.907.12 ▼44.59
Dashboard /wp-admin2.58 ▼0.728.83 ▼37.55
Posts /wp-admin/edit.php2.58 ▼0.7711.44 ▼38.91
Add New Post /wp-admin/post-new.php2.58 ▼3.309.25 ▼78.57
Media Library /wp-admin/upload.php2.58 ▼0.648.96 ▼24.23
Settings /wp-admin/admin.php?page=puchi_setting2.589.73
Split Test /wp-admin/edit.php?post_type=puchi-split-test2.5916.74
Statistic /wp-admin/admin.php?page=puchi_statistic2.599.18

Server storage [IO: ▲3.17MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 412 new files
Database: 1 new table, 6 new options
New tables
wp_puchi_statistic
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Puchi A/B Testing: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲19313.67 ▼0.705.10 ▲3.1541.22 ▼1.47
Dashboard /wp-admin2,239 ▲515.87 ▼0.01116.31 ▲5.4876.00 ▲35.10
Posts /wp-admin/edit.php2,140 ▲512.07 ▲0.0238.45 ▼2.4933.90 ▼2.20
Add New Post /wp-admin/post-new.php1,563 ▲3018.45 ▼4.59640.78 ▼15.3641.08 ▼18.26
Media Library /wp-admin/upload.php1,439 ▲484.25 ▲0.06100.64 ▼2.1078.53 ▲34.47
Settings /wp-admin/admin.php?page=puchi_setting11,25413.11487.01454.80
Split Test /wp-admin/edit.php?post_type=puchi-split-test1,1122.0039.8128.46
Statistic /wp-admin/admin.php?page=puchi_statistic9192.8440.4732.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/puchi-ab-testing/includes/libs/Medoo.php+292
    implode(): Passing glue string after array is deprecated. Swap the parameters
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=puchi_statistic
    • > Deprecated in wp-content/plugins/puchi-ab-testing/includes/libs/Medoo.php+292
    implode(): Passing glue string after array is deprecated. Swap the parameters

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/puchi-ab-testing/admin/partials/puchi-admin-display.php
    • > /wp-content/plugins/puchi-ab-testing/public/partials/puchi-public-display.php
  • 43× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function new_cmb2_box() in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/fields/meta-split.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Select' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/types/CMB2_Type_Taxonomy_Select_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/puchi-ab-testing/includes/libs/cmb2-metabox/includes/types/CMB2_Type_Counter_Base.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=puchi_setting - A preload for 'https://finata.id/wp-content/plugins/wp-whatsapp-chat-pro/assets/icons/qlwf.ttf?9jnas' is found, but is not used because the request credentials mode does not match. Consider taking a look at crossorigin attribute.
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=puchi_setting 2343:31 Uncaught SyntaxError: Identifier 'jqueryParams' has already been declared
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=puchi_setting 2417 Access to font at 'http://finata.id/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.ttf' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Network (severe)
    http://finata.id/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.ttf - Failed to load resource: net::ERR_FAILED
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Console-api (warning) in unknown
    https://static.hotjar.com/c/hotjar-1660536.js?sv=6 2:6863 "Hotjar not launching due to suspicious userAgent:" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/117.0.5938.92 Safari/537.36"
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=puchi_setting 4468:31 Uncaught SyntaxError: Identifier 'jqueryParams' has already been declared
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=puchi_setting 6060 Access to font at 'http://finata.id/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.woff' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Network (severe)
    http://finata.id/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.woff - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Console-api (severe) in unknown
    https://cdn.onesignal.com/sdks/OneSignalSDK.js?ver=6.0.5 0:8343 "window.OneSignal already defined as 'object'!\n Please make sure to define as 'window.OneSignal = window.OneSignal || [];'" OneSignalStubES6
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Console-api (severe) in unknown
    https://cdn.onesignal.com/sdks/OneSignalSDK.js?ver=6.0.5 0:8343 "window.OneSignal already defined as 'function'!\n Please make sure to define as 'window.OneSignal = window.OneSignal || [];'" class Bi{static setDefaultNotificationUrl(e){return Object(d.a)(this,void 0,void 0,function*(){if(!Ri.isValidUrl(e,{allowNull:!0}))throw new InvalidArgumentError.a("url",InvalidArgumentError.b.Malformed);yield Object(X.c)(),Object(X.s)("setDefaultNotificationUrl",e);const t=yield M.a.getAppState();t.defaultNotificationUrl=e,yield M.a.setAppState(t)})}static setDefaultTitle(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("setDefaultTitle",e);const t=yield M.a.getAppState();t.defaultNotificationTitle=e,yield M.a.setAppState(t)})}static setEmail(e,t){return Object(d.a)(this,void 0,void 0,function*(){if(!e)throw new InvalidArgumentError.a("email",InvalidArgumentError.b.Empty);if(!Object(X.r)(e))throw new InvalidArgumentError.a("email",InvalidArgumentError.b.Malformed);const i=Wi.throwIfInvalidAuthHashOptions(t,["identifierAuthHash","emailAuthHash"]);return Object(X.s)("setEmail",e,t),yield Object(X.c)(),yield this.context.secondaryChannelManager.email.setIdentifier(e,i)})}static setSMSNumber(e,t){return Object(d.a)(this,void 0,void 0,function*(){if(!e)throw new InvalidArgumentError.a("smsNumber",InvalidArgumentError.b.Empty);const i=Wi.throwIfInvalidAuthHashOptions(t,["identifierAuthHash"]);return Object(X.s)("setSMSNumber",e,t),yield Object(X.c)(),yield this.context.secondaryChannelManager.sms.setIdentifier(e,i)})}static logoutEmail(){return Object(d.a)(this,void 0,void 0,function*(){return yield Object(X.c)(),yield this.context.secondaryChannelManager.email.logout()})}static logoutSMS(){return Object(d.a)(this,void 0,void 0,function*(){return yield Object(X.c)(),yield this.context.secondaryChannelManager.sms.logout()})}static isPushNotificationsSupported(){return Object(X.s)("isPushNotificationsSupported"),!0}static initializeConfig(e){return Object(d.a)(this,void 0,void 0,function*(){const t=yield(new Ci).getAppConfig(e);E.a.debug(`OneSignal: Final web app config: %c${JSON.stringify(t,null,4)}`,Object(X.k)("code")),Bi.config=t,Bi.environmentInfo=di.getEnvironmentInfo(),Bi.context=new wi(t),Bi.config=Bi.context.appConfig})}static init(e){return Object(d.a)(this,void 0,void 0,function*(){if(Object(X.s)("init"),yield nt.polyfillSafariFetch(),nt.errorIfInitAlreadyCalled(),yield Bi.initializeConfig(e),!Bi.config)throw new Error("OneSignal config not initialized!");if(!g.a.safari||Bi.config.safariWebId){if(Bi.config.userConfig.requiresUserPrivacyConsent){if(!(yield M.a.getProvideUserConsent()))return void(Bi.pendingInit=!0)}yield Bi.delayedInit()}else E.a.warn(new f(c.MissingSafariWebId))})}static delayedInit(){return Object(d.a)(this,void 0,void 0,function*(){function e(){return Object(d.a)(this,void 0,void 0,function*(){if(!Bi.__initAlreadyCalled){if(Bi.__initAlreadyCalled=!0,Bi.emitter.on(Bi.EVENTS.NATIVE_PROMPT_PERMISSIONCHANGED,te.onNotificationPermissionChange),Bi.emitter.on(Bi.EVENTS.SUBSCRIPTION_CHANGED,te._onSubscriptionChanged),Bi.emitter.on(Bi.EVENTS.SDK_INITIALIZED,nt.onSdkInitialized),N.b.isUsingSubscriptionWorkaround()){if(!Bi.config||!Bi.config.subdomain)throw new f(c.MissingSubdomain);Bi.emitter.on(Bi.EVENTS.SESSION_STARTED,hi.setupSessionEventListenersForHttp),Bi.proxyFrameHost=yield _i.discoverAltOrigin(Bi.config)}window.addEventListener("focus",()=>{fe.checkAndTriggerNotificationPermissionChanged()}),yield nt.initSaveState(),yield nt.saveInitOptions(),y.a.getWindowEnv()===oe.a.CustomIframe?yield S.a.trigger(Bi.EVENTS.SDK_INITIALIZED):yield nt.internalInit()}})}Bi.pendingInit=!1,Bi.context.workerMessenger.listen(),"complete"===document.readyState||"interactive"===document.readyState?yield e():(E.a.debug("OneSignal: Waiting for DOMContentLoaded or readyStateChange event before continuing initialization..."),window.addEventListener("DOMContentLoaded",()=>{e()}),document.onreadystatechange=(()=>{"complete"!==document.readyState&&"interactive"!==document.readyState||e()}))})}static provideUserConsent(e){return Object(d.a)(this,void 0,void 0,function*(){yield M.a.setProvideUserConsent(e),e&&Bi.pendingInit&&(yield Bi.delayedInit())})}static showHttpPermissionRequest(e){return Object(d.a)(this,void 0,void 0,function*(){E.a.debug("Called showHttpPermissionRequest(), redirecting to HTTP prompt."),Bi.showHttpPrompt(e).catch(e=>E.a.info(e))})}static showHttpPrompt(e){return Object(d.a)(this,void 0,void 0,function*(){yield Bi.showSlidedownPrompt(e)})}static showNativePrompt(){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),yield Bi.context.promptsManager.internalShowNativePrompt()})}static showSlidedownPrompt(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),yield Bi.context.promptsManager.internalShowParticularSlidedown(T.Push,e)})}static showCategorySlidedown(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)();const t=U.getIsPushNotificationsEnabled();yield Bi.context.promptsManager.internalShowCategorySlidedown(Object.assign(Object.assign({},e),{isInUpdateMode:t}))})}static showSmsSlidedown(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),yield Bi.context.promptsManager.internalShowSmsSlidedown(Object.assign({},e))})}static showEmailSlidedown(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),yield Bi.context.promptsManager.internalShowEmailSlidedown(Object.assign({},e))})}static showSmsAndEmailSlidedown(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),yield Bi.context.promptsManager.internalShowSmsAndEmailSlidedown(Object.assign({},e))})}static registerForPushNotifications(e){return Object(d.a)(this,void 0,void 0,function*(){if(Bi.initialized)return yield nt.registerForPushNotifications(e);yield new Promise((t,i)=>{Bi.emitter.once(Bi.EVENTS.SDK_INITIALIZED,()=>Object(d.a)(this,void 0,void 0,function*(){return yield nt.registerForPushNotifications(e),t()}))})})}static getNotificationPermission(e){return Object(d.a)(this,void 0,void 0,function*(){return yield Object(X.c)(),Bi.privateGetNotificationPermission(e)})}static privateGetNotificationPermission(e){return Object(d.a)(this,void 0,void 0,function*(){const t=yield Bi.context.permissionManager.getNotificationPermission(Bi.config.safariWebId);return e&&e(t),t})}static getTags(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("getTags",e);const{appId:t}=yield M.a.getAppConfig(),{deviceId:i}=yield M.a.getSubscription();if(!i)return E.a.info(new b(r.NoDeviceId)),null;const{tags:n}=yield yt.getPlayer(t,i);return Object(X.j)(e,n),n})}static sendTag(e,t,i){return Object(d.a)(this,void 0,void 0,function*(){const n={};return n[e]=t,yield Bi.sendTags(n,i)})}static sendTags(e,t){return Object(d.a)(this,void 0,void 0,function*(){return yield Object(X.c)(),Object(X.s)("sendTags",e,t),e&&0!==Object.keys(e).length?(Object.keys(e).forEach(t=>{!1===e[t]&&(e[t]="false")}),yield this.context.updateManager.sendTagsUpdate(e),Object(X.j)(t,e),e):(E.a.info(new InvalidArgumentError.a("tags",InvalidArgumentError.b.Empty)),null)})}static deleteTag(e){return Object(d.a)(this,void 0,void 0,function*(){return yield Bi.deleteTags([e])})}static deleteTags(e,t){return Object(d.a)(this,void 0,void 0,function*(){if(yield Object(X.c)(),Object(X.s)("deleteTags",e,t),!Ri.isValidArray(e))throw new InvalidArgumentError.a("tags",InvalidArgumentError.b.Malformed);0===e.length&&E.a.info(new InvalidArgumentError.a("tags",InvalidArgumentError.b.Empty));const i={};for(const t of e)i[t]="";const n=yield Bi.sendTags(i);if(n){const e=Object.keys(n);return Object(X.j)(t,e),e}return[]})}static setExternalUserId(e,t){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("setExternalUserId"),yield Bi.privateSetExternalUserId(e,t)})}static privateSetExternalUserId(e,t){return Object(d.a)(this,void 0,void 0,function*(){Wi.throwIfInvalidAuthHash(t,"authHash"),yield Bi.database.setExternalUserId(e,t),yield Bi.context.updateManager.sendExternalUserIdUpdate(e,t)})}static getExternalUserId(){return Object(d.a)(this,void 0,void 0,function*(){return yield Object(X.c)(),Object(X.s)("getExternalUserId"),yield Bi.database.getExternalUserId()})}static removeExternalUserId(){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("removeExternalUserId"),yield Bi.privateSetExternalUserId(void 0)})}static addListenerForNotificationOpened(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("addListenerForNotificationOpened",e),Bi.emitter.once(Bi.EVENTS.NOTIFICATION_CLICKED,t=>{Object(X.j)(e,t)}),Bi.config&&te.fireStoredNotificationClicks(Bi.config.pageUrl||Bi.config.userConfig.pageUrl)})}static getIdsAvailable(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("getIdsAvailable",e);const{deviceId:t,subscriptionToken:i}=yield M.a.getSubscription(),n={userId:t,registrationId:i};return Object(X.j)(e,n),n})}static isPushNotificationsEnabled(e){return Object(d.a)(this,void 0,void 0,function*(){return yield Object(X.c)(),Bi.privateIsPushNotificationsEnabled(e)})}static privateIsPushNotificationsEnabled(e){return Object(d.a)(this,void 0,void 0,function*(){Object(X.s)("isPushNotificationsEnabled",e);const t=yield Bi.context.subscriptionManager.getSubscriptionState();return Object(X.j)(e,t.subscribed&&!t.optedOut),t.subscribed&&!t.optedOut})}static setSubscription(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("setSubscription",e);const t=yield M.a.getAppConfig(),{appId:i}=t,n=yield M.a.getSubscription(),{deviceId:s}=n;if(!t.appId)throw new m(o.MissingAppId);if(!Ri.isValidBoolean(e))throw new InvalidArgumentError.a("newSubscription",InvalidArgumentError.b.Malformed);if(!s)return void E.a.info(new b(r.NoDeviceId));const a={notification_types:fe.getNotificationTypeFromOptIn(e)},c=yield M.a.getExternalUserIdAuthHash();c&&(a.external_user_id_auth_hash=c),n.optedOut=!e,yield yt.updatePlayer(i,s,a),yield M.a.setSubscription(n),te.onInternalSubscriptionSet(n.optedOut),te.checkAndTriggerSubscriptionChanged()})}static isOptedOut(e){return Object(d.a)(this,void 0,void 0,function*(){return yield Object(X.c)(),Bi.internalIsOptedOut(e)})}static internalIsOptedOut(e){return Object(d.a)(this,void 0,void 0,function*(){Object(X.s)("isOptedOut",e);const{optedOut:t}=yield M.a.getSubscription();return Object(X.j)(e,t),t})}static optOut(e,t){return Object(d.a)(this,void 0,void 0,function*(){if(yield Object(X.c)(),Object(X.s)("optOut",e,t),!Ri.isValidBoolean(e))throw new InvalidArgumentError.a("doOptOut",InvalidArgumentError.b.Malformed);yield Bi.setSubscription(!e),Object(X.j)(t)})}static getEmailId(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("getEmailId",e);const t=(yield M.a.getEmailProfile()).subscriptionId;return Object(X.j)(e,t),t})}static getSMSId(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("getSMSId",e);const t=yield M.a.getSMSProfile(),{subscriptionId:i}=t;return Object(X.j)(e,i),i})}static getUserId(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("getUserId",e);const t=(yield M.a.getSubscription()).deviceId;return Object(X.j)(e,t),t})}static getRegistrationId(e){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("getRegistrationId",e);const t=(yield M.a.getSubscription()).subscriptionToken;return Object(X.j)(e,t),t})}static getSubscription(e){return Object(d.a)(this,void 0,void 0,function*(){return yield Object(X.c)(),yield Bi.privateGetSubscription(e)})}static privateGetSubscription(e){return Object(d.a)(this,void 0,void 0,function*(){Object(X.s)("getSubscription",e);const t=!(yield M.a.getSubscription()).optedOut;return Object(X.j)(e,t),t})}static sendSelfNotification(e="OneSignal Test Message",t="This is an example notification.",i=`${new URL(location.href).origin}?_osp=do_not_open`,n,s,a){return Object(d.a)(this,void 0,void 0,function*(){yield Object(X.c)(),Object(X.s)("sendSelfNotification",e,t,i,n,s,a);const c=yield M.a.getAppConfig(),l=yield M.a.getSubscription();if(!c.appId)throw new m(o.MissingAppId);if(!(yield Bi.isPushNotificationsEnabled()))throw new b(r.NoDeviceId);if(!Ri.isValidUrl(i))throw new InvalidArgumentError.a("url",InvalidArgumentError.b.Malformed);if(!Ri.isValidUrl(n,{allowEmpty:!0,requireHttps:!0}))throw new InvalidArgumentError.a("icon",InvalidArgumentError.b.Malformed);l.deviceId&&(yield yt.sendNotification(c.appId,[l.deviceId],{en:e},{en:t},i,n,s,a))})}static push(e){Ui.processItem(Bi,e)}static on(e,t){return this.emitter.on(e,t)}static off(e,t){return this.emitter.off(e,t)}static once(e,t){return this.emitter.once(e,t)}static sendOutcome(e,t){return Object(d.a)(this,void 0,void 0,function*(){const i=Bi.config.userConfig.outcomes;if(!i)return void E.a.error(`Could not send ${e}. No outcomes config found.`);const n=new pt(Bi.config.appId,i,e,!1);if(void 0!==t&&"number"!=typeof t)return void E.a.error("Outcome weight can only be a number if present.");if(!(yield n.beforeOutcomeSend()))return;const o=yield n.getAttribution();yield n.send({type:o.type,notificationIds:o.notificationIds,weight:t})})}static sendUniqueOutcome(e){return Object(d.a)(this,void 0,void 0,function*(){const t=Bi.config.userConfig.outcomes;if(!t)return void E.a.error(`Could not send ${e}. No outcomes config found.`);const i=new pt(Bi.config.appId,t,e,!0);if(!(yield i.beforeOutcomeSend()))return;const n=yield i.getAttribution();if(n.type===at.NotSupported)return void E.a.warn("You are on a free plan. Please upgrade to use this functionality.");const{notificationIds:o}=n,s=yield i.getNotifsToAttributeWithUniqueOutcome(o);i.shouldSendUnique(n,s)?yield i.send({type:n.type,notificationIds:s}):E.a.warn(`'${e}' was already reported for all notifications.`)})}}
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Javascript (severe) in unknown
    https://finata.id/wp-includes/js/jquery/jquery.min.js?ver=3.6.0 1:84931 Uncaught TypeError: e.indexOf is not a function
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Javascript (severe) in unknown
    https://cdn.onesignal.com/sdks/OneSignalPageSDKES6.js?v=151604 0:151472 Uncaught f: OneSignal: The OneSignal web SDK can only be initi…remove calls initializing the SDK more than once.
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Javascript (severe) in unknown
    https://cdn.onesignal.com/sdks/OneSignalPageSDKES6.js?v=151604 0:243858 Uncaught f: OneSignal: This web push config can only be used o…/finata.id. Your current origin is .
    • > GET request to /wp-admin/admin.php?page=puchi_setting
    • > Network (severe)
    cdn-cgi/rum? - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=puchi_statistic
    • > Network (severe)
    wp-json/puchi/v1/get_page_statistic_data/ - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention: Please take inspiration from this readme.txt

puchi-ab-testing/puchi-ab-testing.php 92% from 13 tests

The main PHP script in "Puchi A/B Testing" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin51,193 lines of code in 257 files:
LanguageFilesBlank linesComment linesLines of code
PO File12114,39218,60732,500
PHP772,5756,6609,445
CSS231,2011,2035,738
JavaScript184096152,060
Sass17305251,408
SVG10042

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity21.33
▷ Minimum class complexity1.00
▷ Maximum class complexity275.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes79
▷ Abstract classes911.39%
▷ Concrete classes7088.61%
▷ Final classes00.00%
Methods645
▷ Static methods9214.26%
▷ Public methods51880.31%
▷ Protected methods10516.28%
▷ Private methods223.41%
Functions34
▷ Named functions3294.12%
▷ Anonymous functions25.88%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/libs/cmb2-metabox/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
includes/libs/cmb2-metabox/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
admin/img/puchi-icon.png4.16KB4.21KB0.00%
includes/libs/cmb2-metabox/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
includes/libs/cmb2-metabox/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%