100% prompty-web-push-notifications

Code Review | Prompty Web Push Notifications

WordPress plugin Prompty Web Push Notifications scored 100% from 54 tests.

About plugin

  • Plugin page: prompty-web-push-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.8.1
  • First release: Oct 18, 2019
  • Latest release: Jun 3, 2021
  • Number of updates: 14
  • Update frequency: every 42.5 days
  • Top authors: prompty (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 415 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼139.17ms] Passed 4 tests

An overview of server-side resources used by Prompty Web Push Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1644.15 ▲20.35
Dashboard /wp-admin3.10 ▲0.0548.10 ▼3.52
Posts /wp-admin/edit.php3.15 ▲0.0548.90 ▲5.00
Add New Post /wp-admin/post-new.php5.46 ▲0.0296.24 ▼556.85
Media Library /wp-admin/upload.php3.04 ▲0.0434.93 ▼1.30
Prompty /wp-admin/options-general.php?page=prompty3.0130.70

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Prompty Web Push Notifications
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.81 ▲0.289.38 ▼0.1051.84 ▲0.40
Dashboard /wp-admin2,978 ▲446.08 ▲0.17142.38 ▼9.11110.29 ▼11.28
Posts /wp-admin/edit.php2,741 ▲22.70 ▼0.0172.10 ▼5.7398.35 ▲7.23
Add New Post /wp-admin/post-new.php1,686 ▲318.79 ▲0.02394.60 ▲22.92113.19 ▲0.71
Media Library /wp-admin/upload.php1,812 ▲55.03 ▲0.01150.56 ▼8.94123.48 ▼4.57
Prompty /wp-admin/options-general.php?page=prompty1,1762.0963.7171.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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 to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

prompty-web-push-notifications/prompty-web-push-notifications.php Passed 13 tests

The principal PHP file in "Prompty Web Push Notifications" v. 1.0.2 is loaded by WordPress automatically on each request
84 characters long description:
Easily integrate the Prompty web push notification service with your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected187 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1338186
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of 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.91
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity8.30
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected