78% notix-web-push-notifications

Code Review | Notix - Web Push Notifications

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

About plugin

  • Plugin page: notix-web-push-no...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-6.2.0
  • WordPress version: 6.3.1
  • First release: Jun 17, 2021
  • Latest release: Oct 25, 2023
  • Number of updates: 25
  • Update frequency: every 34.7 days
  • Top authors: notix (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active /17,387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.60ms] Passed 4 tests

A check of server-side resources used by Notix - Web Push Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1136.53 ▼2.10
Dashboard /wp-admin3.42 ▲0.1146.04 ▼3.11
Posts /wp-admin/edit.php3.53 ▲0.1744.16 ▼4.01
Add New Post /wp-admin/post-new.php6.02 ▲0.1381.10 ▼1.18
Media Library /wp-admin/upload.php3.34 ▲0.1134.78 ▼1.09

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Notix - Web Push Notifications
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲15113.88 ▼0.477.70 ▲6.0438.58 ▼0.40
Dashboard /wp-admin2,207 ▲275.56 ▼0.1183.28 ▼0.9979.85 ▲39.47
Posts /wp-admin/edit.php2,118 ▲152.00 ▲0.0236.55 ▼3.7534.89 ▼0.40
Add New Post /wp-admin/post-new.php6,253 ▲4,72725.88 ▲2.77928.52 ▲193.5048.36 ▼7.53
Media Library /wp-admin/upload.php1,418 ▲154.15 ▼0.1093.30 ▼12.7772.04 ▲28.43

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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 | 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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/notix-web-push-notifications/public/partials/notix-public-display.php
    • > /wp-content/plugins/notix-web-push-notifications/public/partials/notix-public-display-notify-tag-subscribers-popup.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/notix-web-push-notifications/admin/partials/notix-admin-settings-display.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/notix-web-push-notifications/admin/partials/notix-admin-settings-log-display.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_post_tags() in wp-content/plugins/notix-web-push-notifications/public/partials/notix-public-display-notify-tag-subscribers.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/notix-web-push-notifications/public/partials/notix-public-display-tag.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 22 tag instead of maximum 10
You can look at the official readme.txt

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

The main file in "Notix - Web Push Notifications" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("notix-web-push-notifications.php" instead of "notix.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin1,152 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP1721233955
CSS2280190
JavaScript34547

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.50
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods43
▷ Static methods716.28%
▷ Public methods3888.37%
▷ Protected methods00.00%
▷ Private methods511.63%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/menu-icon.png17.84KB0.54KB▼ 96.98%