78% pushnami-web-push-notifications

Code Review | Pushnami - Web Push Notifications

WordPress plugin Pushnami - Web Push Notifications scored78%from 54 tests.

About plugin

  • Plugin page: pushnami-web-push...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-6.0
  • WordPress version: 6.3.1
  • First release: May 15, 2020
  • Latest release: Jun 28, 2022
  • Number of updates: 19
  • Update frequency: every 40.8 days
  • Top authors: pushnami (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,318 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.65ms] Passed 4 tests

Server-side resources used by Pushnami - Web Push Notifications
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.99 ▲4.19
Dashboard /wp-admin3.40 ▲0.0950.52 ▲0.62
Posts /wp-admin/edit.php3.51 ▲0.1554.90 ▲1.46
Add New Post /wp-admin/post-new.php5.98 ▲0.0998.38 ▼8.85
Media Library /wp-admin/upload.php3.32 ▲0.0939.64 ▲5.38

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

Filesystem and database footprint
It is recommended to fix the following issues
  • There were 2 files (0.36KB) illegally modified outside of "wp-content/plugins/pushnami-web-push-notifications/" and "wp-content/uploads/"
    • (new file) service-worker.js
    • (new file) manifest.json
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Pushnami - Web Push Notifications: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.41 ▲0.041.80 ▼0.2543.61 ▲1.57
Dashboard /wp-admin2,241 ▲645.53 ▼0.1585.83 ▼4.9839.05 ▼6.02
Posts /wp-admin/edit.php2,149 ▲492.06 ▲0.0440.45 ▼0.1036.79 ▼4.42
Add New Post /wp-admin/post-new.php1,541 ▲1023.23 ▼0.06686.83 ▲64.0455.22 ▲1.68
Media Library /wp-admin/upload.php1,452 ▲524.21 ▼0.02104.93 ▲0.6344.20 ▼1.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pushnami-web-push-notifications/views/admin/pushnami-settings.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pushnami-web-push-notifications/views/admin/pushnami-settings.php:168

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: webpush, push, push notifications, notifications, subscribe...

pushnami-web-push-notifications/pushnami.php 85% from 13 tests

"Pushnami - Web Push Notifications" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 167 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pushnami-web-push-notifications.php" instead of "pushnami.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected890 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4161191890

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity82.00
▷ Minimum class complexity82.00
▷ Maximum class complexity82.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1653.33%
▷ Public methods2893.33%
▷ Protected methods00.00%
▷ Private methods26.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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 files were detected