83% digitalpush

Code Review | DigitalPUSH notifications

WordPress plugin DigitalPUSH notifications scored83%from 54 tests.

About plugin

  • Plugin page: digitalpush
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1
  • WordPress version: 6.3.1
  • First release: Jul 4, 2019
  • Latest release: Oct 26, 2022
  • Number of updates: 25
  • Update frequency: every 48.4 days
  • Top authors: digitalpush (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,509 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲2.34ms] Passed 4 tests

This is a short check of server-side resources used by DigitalPUSH notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1046.81 ▲4.68
Dashboard /wp-admin3.42 ▲0.1156.96 ▲0.40
Posts /wp-admin/edit.php3.47 ▲0.1152.73 ▲2.50
Add New Post /wp-admin/post-new.php6.00 ▲0.11116.42 ▲19.75
Media Library /wp-admin/upload.php3.34 ▲0.1140.42 ▲1.76
DigitalPUSH /wp-admin/options-general.php?page=digitalpush-notifications3.3838.60

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for DigitalPUSH notifications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲5614.35 ▼0.016.54 ▲4.5744.35 ▲4.86
Dashboard /wp-admin2,221 ▲415.66 ▼0.0184.27 ▼15.4041.71 ▼0.49
Posts /wp-admin/edit.php2,123 ▲232.03 ▲0.0436.22 ▲0.8136.80 ▼3.70
Add New Post /wp-admin/post-new.php1,543 ▲1723.76 ▲0.61648.56 ▼24.3766.07 ▲12.50
Media Library /wp-admin/upload.php1,426 ▲234.22 ▲0.0496.73 ▼22.6743.19 ▼5.75
DigitalPUSH /wp-admin/options-general.php?page=digitalpush-notifications1,2771.6724.0785.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 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 50% 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
Please fix the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/digitalpush/views/sidebar.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/digitalpush/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/digitalpush/views/dashboard-notices.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/digitalpush/dgpntf.php:44

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 31 tag instead of maximum 10
The official readme.txt might help

digitalpush/dgpntf.php 69% from 13 tests

"DigitalPUSH notifications" version 1.6.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("digitalpush.php" instead of "dgpntf.php")

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
There were no executable files found in this plugin463 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP413098457
JavaScript30125
CSS1061

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity4.92
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/overlay.png65.51KB20.56KB▼ 68.62%
images/flying.png14.82KB6.75KB▼ 54.45%
images/balloon.png9.79KB3.70KB▼ 62.18%