10% pushpro-push-notifications

Code Review | PushPro - Push Notifications for WordPress and WooCommerce

WordPress plugin PushPro - Push Notifications for WordPress and WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: pushpro-push-noti...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 6.3.1
  • First release: Aug 8, 2019
  • Latest release: Jan 7, 2021
  • Number of updates: 23
  • Update frequency: every 22.6 days
  • Top authors: pushpro (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 1,441 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/pushpro-push-notifications/includes/class-pushpro-connection.php+6
    The use statement with non-compound name 'Requests' has no effect

Server metrics [RAM: ▼1.92MB] [CPU: ▼52.62ms] Passed 4 tests

A check of server-side resources used by PushPro - Push Notifications for WordPress and WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.38 ▼35.77
Dashboard /wp-admin2.09 ▼1.215.94 ▼46.53
Posts /wp-admin/edit.php2.09 ▼1.275.40 ▼43.64
Add New Post /wp-admin/post-new.php2.09 ▼3.806.50 ▼84.54
Media Library /wp-admin/upload.php2.09 ▼1.148.43 ▼31.20

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by PushPro - Push Notifications for WordPress and WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.27 ▼1.171.64 ▼0.1438.41 ▼1.93
Dashboard /wp-admin2,213 ▲284.95 ▲0.0797.17 ▼15.0783.80 ▲38.47
Posts /wp-admin/edit.php2,105 ▲132.22 ▲0.2133.50 ▼3.2734.39 ▼0.28
Add New Post /wp-admin/post-new.php1,686 ▲15622.28 ▼0.74677.24 ▲13.2938.89 ▼20.82
Media Library /wp-admin/upload.php1,398 ▲134.34 ▲0.15104.46 ▼0.7949.87 ▲6.71

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/pushpro-push-notifications/includes/class-pushpro-connection.php+6
    The use statement with non-compound name 'Requests' has no effect
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      The use statement with non-compound name 'Requests' has no effect in wp-content/plugins/pushpro-push-notifications/includes/class-pushpro-connection.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpro_Basic' not found in wp-content/plugins/pushpro-push-notifications/admin/class-pushpro-admin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Pushpro_Basic' not found in wp-content/plugins/pushpro-push-notifications/public/class-pushpro-public.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: marketing automation, web push notification

pushpro-push-notifications/pushpro.php 85% from 13 tests

The main PHP file in "PushPro - Push Notifications for WordPress and WooCommerce" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pushpro-push-notifications.php" instead of "pushpro.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 275 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin3,853 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32266083,365
PHP1091294472
CSS10016

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.38
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3284.21%
▷ Protected methods25.26%
▷ Private methods410.53%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/menu-item-logo.png1.23KB0.77KB▼ 37.47%
admin/images/full-logo.png11.96KB5.27KB▼ 55.89%