10% sales-pop

Code Review | Live Sales Notification (Recent Sales Popups)

WordPress plugin Live Sales Notification (Recent Sales Popups) scored10%from 54 tests.

About plugin

  • Plugin page: sales-pop
  • Plugin version: 1.4.18
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3
  • WordPress version: 6.3.1
  • First release: Sep 29, 2017
  • Latest release: Dec 19, 2019
  • Number of updates: 82
  • Update frequency: every 9.9 days
  • Top authors: beeketing (100%)

Code review

54 tests

User reviews

305 reviews

Install metrics

2,000+ active /142,314 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/sales-pop/vendor/sentry/sentry/lib/Raven/Client.php+326
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼0.76MB] [CPU: ▼47.56ms] Passed 4 tests

A check of server-side resources used by Live Sales Notification (Recent Sales Popups)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.24 ▼0.2214.55 ▼22.04
Dashboard /wp-admin3.26 ▼0.0915.96 ▼43.24
Posts /wp-admin/edit.php3.26 ▼0.1017.31 ▼33.99
Add New Post /wp-admin/post-new.php3.26 ▼2.6313.23 ▼90.96
Media Library /wp-admin/upload.php3.26 ▲0.0314.31 ▼18.06

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 289 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
beeketing_woocommerce_settings

Browser metrics Passed 4 tests

Live Sales Notification (Recent Sales Popups): an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,974 ▲22814.46 ▲0.201.75 ▲0.0342.07 ▼1.30
Dashboard /wp-admin2,375 ▲1876.25 ▲0.34137.03 ▲35.6982.58 ▲38.46
Posts /wp-admin/edit.php2,107 ▲152.05 ▲0.0737.16 ▼21.8935.08 ▼3.12
Add New Post /wp-admin/post-new.php1,527 ▼623.23 ▲0.09782.12 ▲107.9355.02 ▼0.20
Media Library /wp-admin/upload.php1,394 ▲94.23 ▲0.0198.22 ▼2.3571.47 ▲29.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/sales-pop/vendor/sentry/sentry/lib/Raven/Client.php+326
    Array and string offset access syntax with curly braces is deprecated
  • The plugin did not uninstall correctly, leaving 289 files (1.61MB) in the plugin directory
    • (new file) src/Common/BeeketingAPI.php
    • (new file) composer.lock
    • (new file) sentry.php
    • (new file) config.php
    • (new file) images/icon/icon_menu.png
    • (new file) composer.json
    • (new file) index.php
    • (new file) sales-pop-woocommerce.php
    • (new file) sentry/.gitkeep
    • (new file) readme.txt
    • ...
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • beeketing_woocommerce_settings

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sales-pop/src/Platforms/WooCommerce/Views/sdk_snippet.php
    • > /wp-content/plugins/sales-pop/src/Platforms/WooCommerce/Views/admin_index.php
  • 147× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Buzz\\Exception\\RuntimeException' not found in wp-content/plugins/sales-pop/vendor/kriswallsmith/buzz/lib/Buzz/Exception/ClientException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sales-pop/vendor/symfony/http-foundation/Tests/ExpressionRequestMatcherTest.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Buzz\\Message\\MessageInterface' not found in wp-content/plugins/sales-pop/vendor/kriswallsmith/buzz/lib/Buzz/Message/RequestInterface.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sales-pop/vendor/symfony/http-foundation/Tests/FileBagTest.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'BeeketingConnect_beeketing_woocommerce_salespop\\Common\\Data\\Manager\\BaseManager' not found in wp-content/plugins/sales-pop/src/Common/Data/Manager/CollectionManagerAbstract.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sales-pop/vendor/symfony/http-foundation/Tests/ApacheRequestTest.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Buzz\\Listener\\ListenerInterface' not found in wp-content/plugins/sales-pop/vendor/kriswallsmith/buzz/lib/Buzz/Listener/BearerAuthListener.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/sales-pop/vendor/symfony/http-foundation/Tests/AcceptHeaderItemTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'BeeketingConnect_beeketing_woocommerce_salespop\\Common\\Data\\Manager\\BaseManager' not found in wp-content/plugins/sales-pop/src/Common/Data/Manager/OrderManagerAbstract.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Serializer' not found in wp-content/plugins/sales-pop/vendor/sentry/sentry/lib/Raven/ReprSerializer.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: woocommerce, popup, ecommerce, live sales feed, recent sales notification

sales-pop/sales-pop-woocommerce.php 85% from 13 tests

The primary PHP file in "Live Sales Notification (Recent Sales Popups)" version 1.4.18 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 222 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sales-pop.php" instead of "sales-pop-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin26,643 lines of code in 267 files:
LanguageFilesBlank linesComment linesLines of code
PHP2495,52711,05125,449
JSON600427
Markdown51510426
XML4220263
YAML29063
make16015

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.70
▷ Minimum class complexity1.00
▷ Maximum class complexity219.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces42
Interfaces18
Traits0
Classes220
▷ Abstract classes188.18%
▷ Concrete classes20291.82%
▷ Final classes41.98%
Methods2,000
▷ Static methods1447.20%
▷ Public methods1,76688.30%
▷ Protected methods1055.25%
▷ Private methods1296.45%
Functions84
▷ Named functions3744.05%
▷ Anonymous functions4755.95%
Constants210
▷ Global constants146.67%
▷ Class constants19693.33%
▷ Public constants196100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon/icon_menu.png2.20KB0.62KB▼ 71.66%