10% passbeemedia-web-push-notifications

Code Review | Passbeemedia Web Push Notification

WordPress plugin Passbeemedia Web Push Notification scored10%from 54 tests.

About plugin

  • Plugin page: passbeemedia-web-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Aug 12, 2014
  • Latest release: Aug 12, 2014
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: Sjehutch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,002 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/passbeemedia-web-push-notifications/includes/class-pbm-bbpress.php+9
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.54ms] Passed 4 tests

A check of server-side resources used by Passbeemedia Web Push Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.08 ▲1.77
Dashboard /wp-admin3.33 ▲0.0354.42 ▲2.91
Posts /wp-admin/edit.php3.38 ▲0.0347.91 ▲1.54
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.75 ▼6.92
Media Library /wp-admin/upload.php3.25 ▲0.0334.79 ▼2.53

Server storage [IO: ▲0.22MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
pbm_settings
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Passbeemedia Web Push Notification
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.75 ▲0.131.95 ▲0.2441.82 ▼1.35
Dashboard /wp-admin2,237 ▲635.83 ▲0.3195.81 ▲3.9287.86 ▲39.91
Posts /wp-admin/edit.php2,152 ▲492.23 ▲0.2140.39 ▲2.4945.75 ▲8.82
Add New Post /wp-admin/post-new.php1,568 ▲3123.12 ▲5.07677.87 ▲53.8037.72 ▼22.67
Media Library /wp-admin/upload.php1,445 ▲484.27 ▲0.09101.33 ▼0.8583.22 ▲37.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/passbeemedia-web-push-notifications/pbm.php:12
    • > PHP Warning
      Use of undefined constant PBM_URL - assumed 'PBM_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/passbeemedia-web-push-notifications/layout/admin.php on line 60
    • > PHP Notice
      Undefined variable: pbm_active_key in wp-content/plugins/passbeemedia-web-push-notifications/layout/admin.php on line 54
    • > PHP Notice
      Undefined variable: pbm_active_key in wp-content/plugins/passbeemedia-web-push-notifications/layout/admin.php on line 40
    • > PHP Fatal error
      Uncaught Error: Class 'Pbm' not found in wp-content/plugins/passbeemedia-web-push-notifications/layout/admin.php:66
    • > PHP Notice
      Undefined variable: pbm_active_key in wp-content/plugins/passbeemedia-web-push-notifications/layout/admin.php on line 3

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 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

passbeemedia-web-push-notifications/pbm.php 92% from 13 tests

"Passbeemedia Web Push Notification" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("passbeemedia-web-push-notifications.php" instead of "pbm.php")

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
No dangerous file extensions were detected2,278 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP5144151,345
CSS21467875
JavaScript53958

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity41.00
▷ Minimum class complexity10.00
▷ Maximum class complexity76.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods52
▷ Static methods2751.92%
▷ Public methods5198.08%
▷ Protected methods11.92%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
layout/images/pbm-red-logo.png1.72KB1.61KB▼ 5.92%
layout/images/pbm-arrow.png0.98KB0.15KB▼ 84.98%
layout/images/pbm_logo.png6.63KB4.05KB▼ 38.95%
layout/images/pbm-arrow-white.png0.97KB0.17KB▼ 83.05%
layout/images/pbm-icon-25.png2.06KB1.13KB▼ 45.18%