77% push-notification-for-wp-by-pushassist

Code Review | Push Notifications for WordPress by PushAssist

WordPress plugin Push Notifications for WordPress by PushAssist scored77%from 54 tests.

About plugin

  • Plugin page: push-notification...
  • Plugin version: 3.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.5-5.9.3
  • WordPress version: 6.3.1
  • First release: Mar 12, 2016
  • Latest release: Apr 2, 2023
  • Number of updates: 180
  • Update frequency: every 14.3 days
  • Top authors: pushassist (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /31,985 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▲1.49ms] Passed 4 tests

A check of server-side resources used by Push Notifications for WordPress by PushAssist
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5041.14 ▲0.28
Dashboard /wp-admin3.87 ▲0.5254.95 ▼11.94
Posts /wp-admin/edit.php3.92 ▲0.5659.96 ▲14.57
Add New Post /wp-admin/post-new.php6.39 ▲0.50105.82 ▲4.45
Media Library /wp-admin/upload.php3.73 ▲0.5049.58 ▲13.15
PushAssist /wp-admin/admin.php?page=pushassist-admin3.7340.61
Create Account /wp-admin/admin.php?page=pushassist-create-account3.7338.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 120 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Push Notifications for WordPress by PushAssist: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.61 ▼0.621.69 ▼0.4537.46 ▼4.87
Dashboard /wp-admin2,222 ▲435.86 ▲0.04110.36 ▲2.3879.45 ▲36.18
Posts /wp-admin/edit.php2,117 ▲282.02 ▲0.0240.09 ▲1.1735.68 ▲3.32
Add New Post /wp-admin/post-new.php1,538 ▲817.57 ▼5.33767.93 ▲181.3256.97 ▼8.55
Media Library /wp-admin/upload.php1,413 ▲254.21 ▼0.01103.84 ▲1.5266.59 ▲23.36
PushAssist /wp-admin/admin.php?page=pushassist-admin2,8513.8873.1686.88
Create Account /wp-admin/admin.php?page=pushassist-create-account2,8544.1771.3738.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-admin-display.php
    • > /wp-content/plugins/push-notification-for-wp-by-pushassist/public/partials/pushassist-public-display.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-create-account.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-amp-integration-steps.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-welcome-message-setting.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-campaign.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/class-pushassist-admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-subscribers.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-segments.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-setting.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-custom-setting.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/push-notification-for-wp-by-pushassist/admin/partials/pushassist-dashboard.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 need to be fixed: You can take inspiration from this readme.txt

push-notification-for-wp-by-pushassist/pushassist.php 85% from 13 tests

The main file in "Push Notifications for WordPress by PushAssist" v. 3.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 147 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("push-notification-for-wp-by-pushassist.php" instead of "pushassist.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected8,884 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
PHP271,5208066,882
PO File2353567825
SVG200797
JavaScript15757198
HTML31714168
CSS130714

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity56.14
▷ Minimum class complexity1.00
▷ Maximum class complexity342.00
Average method complexity6.36
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods72
▷ Static methods4461.11%
▷ Public methods6793.06%
▷ Protected methods00.00%
▷ Private methods56.94%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
32 PNG files occupy 0.88MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/logo-login.png1.81KB0.75KB▼ 58.75%
admin/images/setting-icons/price-drop.png2.48KB1.12KB▼ 54.91%
admin/images/setting-icons/promo-icon.png3.61KB1.79KB▼ 50.42%
admin/images/setting-icons/order-delivery-notifications.png2.92KB1.62KB▼ 44.34%
admin/images/btn_icon_yes.png1.00KB0.25KB▼ 74.61%