78% trustpulse-api

Code Review | FOMO & Social Proof Notifications by TrustPulse - Best WordPress FOMO Plugin

WordPress plugin FOMO & Social Proof Notifications by TrustPulse - Best WordPress FOMO Plugin scored78%from 54 tests.

About plugin

  • Plugin page: trustpulse-api
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.3
  • WordPress version: 6.3.1
  • First release: May 16, 2019
  • Latest release: Sep 19, 2023
  • Number of updates: 21
  • Update frequency: every 75.6 days
  • Top authors: jtsternberg (42.86%)trustpulse (28.57%)dvinson (23.81%)mattawesomemotive (14.29%)thebrandonallen (9.52%)

Code review

54 tests

User reviews

15 reviews

Install metrics

40,000+ active /364,221 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.17ms] Passed 4 tests

Analyzing server-side resources used by FOMO & Social Proof Notifications by TrustPulse - Best WordPress FOMO Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.86 ▼4.38
Dashboard /wp-admin3.45 ▲0.1551.65 ▲3.45
Posts /wp-admin/edit.php3.56 ▲0.2149.94 ▼1.01
Add New Post /wp-admin/post-new.php6.03 ▲0.1590.08 ▼2.72
Media Library /wp-admin/upload.php3.37 ▲0.1542.07 ▲7.64

Server storage [IO: ▲2.83MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 43 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
_amn_tp_last_checked
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by FOMO & Social Proof Notifications by TrustPulse - Best WordPress FOMO Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲4014.11 ▼0.291.69 ▼0.2940.20 ▼1.73
Dashboard /wp-admin2,229 ▲495.59 ▲0.0184.88 ▼6.4836.71 ▼0.69
Posts /wp-admin/edit.php2,137 ▲342.00 ▼0.0137.03 ▲0.0730.89 ▼1.02
Add New Post /wp-admin/post-new.php1,546 ▲918.11 ▲0.09629.42 ▼8.81101.23 ▼0.12
Media Library /wp-admin/upload.php1,437 ▲374.21 ▼0.09101.43 ▲0.7443.39 ▼1.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • _amn_tp_last_checked

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/trustpulse-api/views/partials/trustpulse-woocommerce-webhooks.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/trustpulse-api/views/partials/trustpulse-woocommerce-webhooks.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trustpulse_dir_uri() in wp-content/plugins/trustpulse-api/views/partials/trustpulse-works-on.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/trustpulse-api/views/trustpulse-settings-page.php:2
    • > PHP Notice
      Undefined variable: campaign_webhooks in wp-content/plugins/trustpulse-api/views/partials/trustpulse-woocommerce-webhooks.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/trustpulse-api/views/trustpulse-woocommerce-verification-page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: fomo, ecommerce, membership, woocommerce, social proof

trustpulse-api/trustpulse.php 92% from 13 tests

"FOMO & Social Proof Notifications by TrustPulse - Best WordPress FOMO Plugin" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("trustpulse-api.php" instead of "trustpulse.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected1,366 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP9169555899
SVG601465
CSS1001
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity27.20
▷ Minimum class complexity9.00
▷ Maximum class complexity84.00
Average method complexity4.05
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods43
▷ Static methods511.63%
▷ Public methods4297.67%
▷ Protected methods12.33%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants888.89%
▷ Class constants111.11%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.19MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/video-background.png19.43KB9.70KB▼ 50.07%
assets/images/ninja-forms.png26.39KB9.75KB▼ 63.04%
assets/images/BigCommerce-logo.png27.48KB12.95KB▼ 52.89%
assets/images/logo-om.png23.15KB8.65KB▼ 62.62%
assets/images/wpforms.png7.49KB7.83KB0.00%