89% notifadz-by-adrenalead-web-push-notifications

Code Review | Notifadz by Adrenalead - Web Push Notification

WordPress plugin Notifadz by Adrenalead - Web Push Notification scored89%from 54 tests.

About plugin

  • Plugin page: notifadz-by-adren...
  • Plugin version: 3.0.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Feb 16, 2021
  • Latest release: Nov 8, 2023
  • Number of updates: 99
  • Update frequency: every 10.1 days
  • Top authors: adrenalead (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /725 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▲2.04ms] Passed 4 tests

A check of server-side resources used by Notifadz by Adrenalead - Web Push Notification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.91 ▲1.45
Dashboard /wp-admin3.50 ▲0.19508.27 ▲458.95
Posts /wp-admin/edit.php3.54 ▲0.1847.84 ▼3.54
Add New Post /wp-admin/post-new.php6.02 ▲0.1396.49 ▲4.26
Media Library /wp-admin/upload.php3.34 ▲0.1137.27 ▲5.99

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 35 new files
Database: no new tables, 9 new options
New WordPress options
adrenalead_notifadz_need_to_copy_ads
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
adrenalead_notifadz_worker
adrenalead_notifadz_ads
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Notifadz by Adrenalead - Web Push Notification
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7113.19 ▼1.161.73 ▼0.0241.42 ▼2.73
Dashboard /wp-admin2,235 ▲585.88 ▲0.3496.57 ▼7.2855.23 ▲10.17
Posts /wp-admin/edit.php2,124 ▲242.29 ▲0.3541.63 ▲5.1453.02 ▲16.36
Add New Post /wp-admin/post-new.php1,560 ▲3423.52 ▲0.65711.70 ▲84.9852.23 ▲2.51
Media Library /wp-admin/upload.php1,443 ▲464.43 ▲0.24116.15 ▲17.7661.49 ▲20.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • adrenalead_notifadz_need_to_copy_ads
    • adrenalead_notifadz_ads
    • can_compress_scripts
    • adrenalead_notifadz_worker
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: push, web push notification, push messages, notification, web push...

notifadz-by-adrenalead-web-push-notifications/ntdz.php 85% from 13 tests

The primary PHP file in "Notifadz by Adrenalead - Web Push Notification" version 3.0.6 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("notifadz-by-adrenalead-web-push-notifications.php" instead of "ntdz.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)

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
No dangerous file extensions were detected2,117 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP78941905
CSS11451763
JavaScript37339440
SVG1009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 3.61MB with 1.90MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
res/img/ntdz_tempperso.png6.84KB3.48KB▼ 49.12%
res/img/connect_img.png158.23KB51.75KB▼ 67.30%
res/img/ico_thumb.png1.50KB1.00KB▼ 33.25%
res/img/dashboard_ntdz.png120.69KB42.35KB▼ 64.91%
res/img/notifadz.png29.74KB15.08KB▼ 49.32%