56% push-monkey-desktop-push-notifications

Code Review | Push Monkey Pro – Web Push Notifications and WooCommerce Abandoned Cart

WordPress plugin Push Monkey Pro – Web Push Notifications and WooCommerce Abandoned Cart scored 56% from 54 tests.

About plugin

  • Plugin page: push-monkey-deskt...
  • Plugin version: 3.9
  • PHP compatiblity: 5.6.33+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9
  • WordPress version: 6.3.1
  • First release: Nov 5, 2014
  • Latest release: Feb 18, 2022
  • Number of updates: 138
  • Update frequency: every 19.3 days
  • Top authors: mowow (98.55%)pushmonkey (2.17%)

Code review

54 tests

User reviews

26 reviews

Install metrics

100+ active / 20,148 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.80MB] [CPU: ▼3.32ms] Passed 4 tests

Server-side resources used by Push Monkey Pro – Web Push Notifications and WooCommerce Abandoned Cart
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7643.52 ▼0.32
Dashboard /wp-admin4.11 ▲0.8152.45 ▲1.50
Posts /wp-admin/edit.php4.17 ▲0.8156.40 ▲4.45
Add New Post /wp-admin/post-new.php6.71 ▲0.8393.87 ▼18.89
Media Library /wp-admin/upload.php4.03 ▲0.8145.83 ▲11.37
Permission Settings /wp-admin/admin.php?page=push_monkey_pages4.0441.21
Segmentation /wp-admin/admin.php?page=push_monkey_segmentation4.0234.15
Categories /wp-admin/admin.php?page=push_monkey_categories4.0342.47
★ Send Notification /wp-admin/admin.php?page=push_monkey_send_push4.0335.23
Post Types /wp-admin/admin.php?page=push_monkey_post_types4.0235.24
Feedback Dialogs /wp-admin/admin.php?page=push_monkey_feedback_dialogs4.0338.75
WooCommerce /wp-admin/admin.php?page=push_monkey_woocommerce4.0337.73
Settings /wp-admin/admin.php?page=push_monkey_general4.0236.95
Push Monkey /wp-admin/admin.php?page=push_monkey_main_config4.0338.25

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 262 new files
Database: no new tables, 10 new options
New WordPress options
can_compress_scripts
push_monkey_notif_format
widget_recent-posts
widget_theysaidso_widget
push_monkey_post_types
theysaidso_admin_options
push_monkey_subdomain_settings
widget_recent-comments
push_monkey_excluded_categories
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Push Monkey Pro – Web Push Notifications and WooCommerce Abandoned Cart
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,251 ▲50514.23 ▼0.451.97 ▲0.4828.54 ▼11.47
Dashboard /wp-admin2,642 ▲4576.12 ▲1.22120.11 ▲16.5183.75 ▲39.37
Posts /wp-admin/edit.php2,291 ▲2022.53 ▲0.5243.21 ▲1.7237.86 ▲3.36
Add New Post /wp-admin/post-new.php6,678 ▲5,13622.47 ▲4.29963.31 ▲315.25120.81 ▲61.33
Media Library /wp-admin/upload.php1,583 ▲1925.00 ▲0.85124.55 ▲25.6852.13 ▲10.36
Permission Settings /wp-admin/admin.php?page=push_monkey_pages1,2572.6745.3791.09
Segmentation /wp-admin/admin.php?page=push_monkey_segmentation1,2542.6744.9464.12
Categories /wp-admin/admin.php?page=push_monkey_categories1,2542.6038.7359.46
★ Send Notification /wp-admin/admin.php?page=push_monkey_send_push1,2952.6137.3672.98
Post Types /wp-admin/admin.php?page=push_monkey_post_types1,2562.6843.6185.88
Feedback Dialogs /wp-admin/admin.php?page=push_monkey_feedback_dialogs1,2192.6740.0364.94
WooCommerce /wp-admin/admin.php?page=push_monkey_woocommerce1,2552.6438.6372.99
Settings /wp-admin/admin.php?page=push_monkey_general1,2562.6437.0362.07
Push Monkey /wp-admin/admin.php?page=push_monkey_main_config1,2562.6138.0657.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/push-monkey-desktop-push-notifications/uninstall.php+48
    unlink(service-worker-.php): No such file or directory
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=push_monkey_woocommerce
    • > Notice in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/woo-info.php+25
    Undefined variable: woocommerce_is_active

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
  • 12× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/widgets/push_monkey_stats_widget.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/messages/push_monkey_welcome_notice.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/parts/log-in-old.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/messages/push_monkey_upsell_notice.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/parts/header.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/messages/push_monkey_big_message.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/service_worker.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/widgets/push_monkey_push_widget.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/parts/footer-old.php
    • > /wp-content/plugins/push-monkey-desktop-push-notifications/templates/messages/push_monkey_big_expiration_notice.php
  • 110× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: signed_in in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/statistics.php on line 3
    • > PHP Notice
      Trying to get property 'geo_data' of non-object in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/parts/footer-old.php on line 84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/pages.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/notification-format.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/feedback-dialogs.php:4
    • > PHP Notice
      Trying to get property 'subscribers_today' of non-object in wp-content/plugins/push-monkey-desktop-push-notifications/templates/widgets/push_monkey_stats_widget.php on line 34
    • > PHP Notice
      Undefined variable: return_url in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/parts/log-in-old.php on line 68
    • > PHP Notice
      Undefined variable: pluginPath in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/parts/log-in-old.php on line 3
    • > PHP Notice
      Trying to get property 'sent_notifications' of non-object in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/parts/footer-old.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/push-monkey-desktop-push-notifications/templates/pages/settings/general.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=push_monkey_send_push
    • > Network (severe)
    https://thumbs.gfycat.com/TightAmusedKakarikis-max-1mb.gif - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: You are using too many tags: 23 tag instead of maximum 10
The official readme.txt is a good inspiration

push-monkey-desktop-push-notifications/push-monkey.php 77% from 13 tests

The primary PHP file in "Push Monkey Pro – Web Push Notifications and WooCommerce Abandoned Cart" version 3.9 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("push-monkey-desktop-push-notifications.php" instead of "push-monkey.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 411 characters long)
  • Plugin Name: Please shorten the plugin name (currently 73 characters long instead of max. 70)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin42,581 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
CSS581,42177723,224
JavaScript3451135410,716
PHP491,2631,2576,728
SVG601980
Markdown31290559
LESS15715358
JSON20016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity38.36
▷ Minimum class complexity1.00
▷ Maximum class complexity413.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods231
▷ Static methods10.43%
▷ Public methods22999.13%
▷ Protected methods00.00%
▷ Private methods20.87%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants00.00%
▷ Class constants29100.00%
▷ Public constants29100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
77 PNG files occupy 0.57MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/blueimp/video-play.png2.75KB1.80KB▼ 34.51%
img/jquery/resize-icon@2x.png0.39KB0.26KB▼ 34.49%
img/dropzone/spritemap.png18.56KB9.56KB▼ 48.47%
img/icons/png.png2.69KB1.91KB▼ 29.01%
img/default/banner-close-dark.png2.92KB0.42KB▼ 85.80%