68% pushbots-web-push-notifications

Code Review | PushBots - Web Push Notifications

WordPress plugin PushBots - Web Push Notifications scored68%from 54 tests.

About plugin

  • Plugin page: pushbots-web-push...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 13, 2017
  • Latest release: Apr 8, 2020
  • Number of updates: 30
  • Update frequency: every 29.2 days
  • Top authors: pushbots (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,173 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.91MB] [CPU: ▼33.39ms] Passed 4 tests

Server-side resources used by PushBots - Web Push Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0644.15 ▲2.13
Dashboard /wp-admin3.03 ▼0.2730.56 ▼22.67
Posts /wp-admin/edit.php3.03 ▼0.3327.22 ▼29.16
Add New Post /wp-admin/post-new.php3.03 ▼2.8623.97 ▼70.37
Media Library /wp-admin/upload.php3.03 ▼0.2027.47 ▼11.36

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

PushBots - Web Push Notifications: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.72 ▼0.661.95 ▼0.0248.69 ▲7.99
Dashboard /wp-admin2,227 ▲394.86 ▼0.96106.42 ▼4.8138.83 ▼16.79
Posts /wp-admin/edit.php2,107 ▲152.03 ▼0.0136.03 ▼13.1433.08 ▼3.20
Add New Post /wp-admin/post-new.php6,240 ▲4,71226.17 ▲8.06966.22 ▲351.1365.91 ▼12.61
Media Library /wp-admin/upload.php1,403 ▲154.19 ▲0.00107.43 ▼1.3446.32 ▼0.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pushbots-web-push-notifications/sdk/pushbots-worker.js.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/pushbots-web-push-notifications/script.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pushbots-web-push-notifications/admin-settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

pushbots-web-push-notifications/index.php 92% from 13 tests

The main PHP script in "PushBots - Web Push Notifications" version 1.1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pushbots-web-push-notifications.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected431 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP68092406
Markdown17012
JavaScript1009
JSON1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods3096.77%
▷ Protected methods00.00%
▷ Private methods13.23%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin