74% pushconnect-web-push-messaging

Code Review | PushConnect Push Notifications

WordPress plugin PushConnect Push Notifications scored74%from 54 tests.

About plugin

  • Plugin page: pushconnect-web-p...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.1
  • WordPress version: 6.3.1
  • First release: Jan 18, 2019
  • Latest release: Jan 30, 2019
  • Number of updates: 5
  • Update frequency: every 3.0 days
  • Top authors: pauljwweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /508 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.97ms] Passed 4 tests

A check of server-side resources used by PushConnect Push Notifications
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.53 ▼1.21
Dashboard /wp-admin3.36 ▲0.0651.83 ▼8.06
Posts /wp-admin/edit.php3.47 ▲0.1150.32 ▲0.79
Add New Post /wp-admin/post-new.php5.94 ▲0.0585.31 ▼12.60
Media Library /wp-admin/upload.php3.28 ▲0.0535.85 ▼1.99
PushConnect /wp-admin/options-general.php?page=puschonnect_settings3.2534.31

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 1 file (5.96KB) illegally modified outside of "wp-content/plugins/pushconnect-web-push-messaging/" and "wp-content/uploads/"
    • (new file) pushconnect-sw.js
Filesystem: 5 new files
Database: 1 new table, 6 new options
New tables
wp_pushconnect_tracking
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by PushConnect Push Notifications
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.27 ▼1.112.19 ▲0.5440.21 ▼6.31
Dashboard /wp-admin2,210 ▲365.85 ▼0.0195.09 ▼28.1936.37 ▼14.45
Posts /wp-admin/edit.php2,093 ▲72.00 ▼0.0033.11 ▼1.1035.08 ▼1.25
Add New Post /wp-admin/post-new.php1,522 ▲823.33 ▲5.72679.25 ▼25.9760.99 ▼9.90
Media Library /wp-admin/upload.php1,392 ▲14.26 ▼0.0299.45 ▼0.7644.59 ▲0.44
PushConnect /wp-admin/options-general.php?page=puschonnect_settings8842.0526.8026.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_pushconnect_tracking
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/pushconnect-web-push-messaging/pushconnect.php:297

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: push messaging, push, marketing, push notification, web push...

pushconnect-web-push-messaging/pushconnect.php 92% from 13 tests

The main PHP file in "PushConnect Push Notifications" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("pushconnect-web-push-messaging.php" instead of "pushconnect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin408 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16321234
JavaScript12542132
PO File1131442

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions975.00%
▷ Anonymous functions325.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin