78% pushe-webpush

Code Review | Pushe Web Push Notification

WordPress plugin Pushe Web Push Notification scored 78% from 54 tests.

About plugin

  • Plugin page: pushe-webpush
  • Plugin version: 0.5.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3
  • WordPress version: 6.3.1
  • First release: May 22, 2019
  • Latest release: Jun 28, 2021
  • Number of updates: 25
  • Update frequency: every 30.7 days
  • Top authors: pusheco (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active / 2,594 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.32MB] [CPU: ▼3.53ms] Passed 4 tests

This is a short check of server-side resources used by Pushe Web Push Notification
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3438.58 ▼1.46
Dashboard /wp-admin3.65 ▲0.3548.07 ▼6.72
Posts /wp-admin/edit.php3.71 ▲0.3548.28 ▼0.39
Add New Post /wp-admin/post-new.php6.19 ▲0.3186.37 ▼3.74
Media Library /wp-admin/upload.php3.52 ▲0.2936.95 ▼2.20
Modal Options /wp-admin/admin.php?page=pushe_modal_options3.4835.78
Settings /wp-admin/admin.php?page=pushe_settings3.4833.61
Bell Options /wp-admin/admin.php?page=pushe_bell_options3.4832.80

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
pushe_webpush_modal_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Pushe Web Push Notification
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.60 ▼1.031.62 ▼0.1641.62 ▼8.11
Dashboard /wp-admin2,234 ▲435.79 ▲0.8994.56 ▼21.4740.17 ▼0.28
Posts /wp-admin/edit.php2,120 ▲281.99 ▲0.0133.44 ▼8.5532.30 ▼3.26
Add New Post /wp-admin/post-new.php1,540 ▲2317.61 ▲0.12702.13 ▲32.3854.82 ▼3.91
Media Library /wp-admin/upload.php1,419 ▲314.21 ▲0.01105.67 ▲6.9845.60 ▼0.01
Modal Options /wp-admin/admin.php?page=pushe_modal_options1,0442.0629.0134.04
Settings /wp-admin/admin.php?page=pushe_settings8762.1821.9027.38
Bell Options /wp-admin/admin.php?page=pushe_bell_options8972.1522.8828.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pushe-webpush/pushe-webpush.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\api\\callbacks\\BaseCallbacks' not found in wp-content/plugins/pushe-webpush/inc/api/callbacks/ModalOptionsCallback.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\base\\BaseController' not found in wp-content/plugins/pushe-webpush/inc/base/SettingsLinks.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\api\\callbacks\\BaseCallbacks' not found in wp-content/plugins/pushe-webpush/inc/api/callbacks/BellOptionsCallback.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pushe-webpush/templates/bellOptions.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\base\\BaseController' not found in wp-content/plugins/pushe-webpush/inc/base/Enqueue.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\base\\BaseController' not found in wp-content/plugins/pushe-webpush/inc/pages/AdminPages.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\api\\callbacks\\BaseCallbacks' not found in wp-content/plugins/pushe-webpush/inc/api/callbacks/SettingsCallbacks.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\base\\BaseController' not found in wp-content/plugins/pushe-webpush/inc/api/callbacks/BaseCallbacks.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Inc\\base\\BaseController' not found in wp-content/plugins/pushe-webpush/inc/base/WebpushScripts.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pushe-webpush/templates/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

pushe-webpush/pushe-webpush.php Passed 13 tests

The primary PHP file in "Pushe Web Push Notification" version 0.5.0 is used by WordPress to initiate all plugin functionality
49 characters long description:
Official Pushe.co's webpush plugin for wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,584 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP282422491,329
PO File14554108
CSS113077
Markdown119030
JavaScript22023
JSON20017

PHP code Passed 2 tests

Analyzing 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.38
Average class complexity8.33
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes15.56%
Methods72
▷ Static methods912.50%
▷ Public methods6894.44%
▷ Protected methods00.00%
▷ Private methods45.56%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin