84% pushpad-web-push-notifications

Code Review | Pushpad Web Push Notifications

WordPress plugin Pushpad Web Push Notifications scored 84% from 54 tests.

About plugin

  • Plugin page: pushpad-web-push-...
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: May 12, 2016
  • Latest release: Oct 19, 2022
  • Number of updates: 68
  • Update frequency: every 34.6 days
  • Top authors: collimarco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 7,342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.67MB] [CPU: ▼16.88ms] Passed 4 tests

Analyzing server-side resources used by Pushpad Web Push Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0233.55 ▼7.37
Dashboard /wp-admin3.32 ▲0.0245.81 ▼1.78
Posts /wp-admin/edit.php3.38 ▲0.0246.82 ▼1.04
Add New Post /wp-admin/post-new.php3.15 ▼2.7437.29 ▼57.33
Media Library /wp-admin/upload.php3.25 ▲0.0235.95 ▼0.48
Pushpad /wp-admin/options-general.php?page=pushpad-settings3.2131.87

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_pushpad_widget
pushpad_delivery_result
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pushpad Web Push Notifications
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7613.25 ▼1.057.04 ▲4.8941.33 ▼10.15
Dashboard /wp-admin2,210 ▲254.85 ▼1.01107.23 ▲10.4339.59 ▼3.30
Posts /wp-admin/edit.php2,093 ▲72.01 ▼0.0338.54 ▲3.9635.03 ▲0.71
Add New Post /wp-admin/post-new.php6,469 ▲4,94920.21 ▼2.88822.16 ▲146.8956.82 ▲3.95
Media Library /wp-admin/upload.php1,392 ▲44.22 ▲0.0395.10 ▼3.1741.78 ▲0.08
Pushpad /wp-admin/options-general.php?page=pushpad-settings8062.0623.4127.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • pushpad_delivery_result
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_pushpad_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pushpad-web-push-notifications/pushpad.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pushpad-web-push-notifications/includes/shortcode.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pushpad-web-push-notifications/includes/metabox.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pushpad-web-push-notifications/includes/widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

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
6 plugin tags: push notifications, push, push api, web push, notifications...

pushpad-web-push-notifications/pushpad.php 85% from 13 tests

The main file in "Pushpad Web Push Notifications" v. 2.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pushpad-web-push-notifications.php" instead of "pushpad.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin322 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP76434322

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.45
Average class complexity11.25
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods975.00%
▷ Protected methods00.00%
▷ Private methods325.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin