72% push-notifications-by-larapush

Code Review | Push Notifications by LaraPush

WordPress plugin Push Notifications by LaraPush scored72%from 54 tests.

About plugin

  • Plugin page: push-notification...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Mar 21, 2023
  • Latest release: Jun 11, 2023
  • Number of updates: 13
  • Update frequency: every 6.3 days
  • Top authors: larapush (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /2,563 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼17.54ms] Passed 4 tests

An overview of server-side resources used by Push Notifications by LaraPush
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1944.10 ▼1.43
Dashboard /wp-admin3.38 ▲0.0336.56 ▼29.77
Posts /wp-admin/edit.php3.45 ▲0.0941.47 ▼12.90
Add New Post /wp-admin/post-new.php5.63 ▼0.2684.17 ▼24.35
Media Library /wp-admin/upload.php3.39 ▲0.1635.76 ▼3.13
Larapush Panel /wp-admin/admin.php?page=unlimited-push-notifications-by-larapush3.3937.67
Settings /wp-admin/admin.php?page=unlimited-push-notifications-by-larapush-settings3.4336.04

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Push Notifications by LaraPush
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8614.37 ▲0.071.96 ▲0.2349.55 ▲0.95
Dashboard /wp-admin2,256 ▲825.68 ▲0.1384.62 ▼3.2383.75 ▲39.63
Posts /wp-admin/edit.php2,166 ▲662.05 ▲0.0139.94 ▼0.6234.94 ▼3.45
Add New Post /wp-admin/post-new.php1,575 ▲3517.72 ▼0.57709.46 ▲80.5154.55 ▲4.81
Media Library /wp-admin/upload.php1,449 ▲524.18 ▼0.07108.87 ▲5.3883.66 ▲34.00
Larapush Panel /wp-admin/admin.php?page=unlimited-push-notifications-by-larapush1,5992.3927.3433.00
Settings /wp-admin/admin.php?page=unlimited-push-notifications-by-larapush-settings9152.0424.5628.35

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=unlimited-push-notifications-by-larapush-settings
    • > Notice in wp-content/plugins/push-notifications-by-larapush/admin/partials/unlimited-push-notifications-by-larapush-admin-settings.php+41
    Undefined variable: integration_done

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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/push-notifications-by-larapush/public/partials/amp-header.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/push-notifications-by-larapush/public/partials/web-header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/push-notifications-by-larapush/public/partials/amp-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_url() in wp-content/plugins/push-notifications-by-larapush/public/partials/amp-after-body-opening.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/push-notifications-by-larapush/public/partials/amp-style.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("[LaraPush.com](https://larapush.com/ "Self hosted Push Notifications at one-time cost")")
You can look at the official readme.txt

push-notifications-by-larapush/unlimited-push-notifications-by-larapush.php 92% from 13 tests

This is the main PHP file of "Push Notifications by LaraPush" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("push-notifications-by-larapush.php" instead of "unlimited-push-notifications-by-larapush.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,304 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP191886821,267
JavaScript152722
SVG20015

PHP code Passed 2 tests

An short overview of 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 complexity15.12
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.43
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods48
▷ Static methods1429.17%
▷ Public methods4287.50%
▷ Protected methods00.00%
▷ Private methods612.50%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin