74% push-notifications-for-wp

Code Review | Push Notifications for WordPress (Lite)

WordPress plugin Push Notifications for WordPress (Lite) scored74%from 54 tests.

About plugin

  • Plugin page: push-notification...
  • Plugin version: 6.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 8, 2015
  • Latest release: Nov 25, 2022
  • Number of updates: 351
  • Update frequency: every 7.8 days
  • Top authors: delitestudio (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

500+ active /61,289 total downloads

Benchmarks

Plugin footprint 65% 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.08MB] [CPU: ▼2.16ms] Passed 4 tests

This is a short check of server-side resources used by Push Notifications for WordPress (Lite)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0639.60 ▼4.25
Dashboard /wp-admin3.37 ▲0.0746.25 ▼0.87
Posts /wp-admin/edit.php3.48 ▲0.1346.79 ▼1.47
Add New Post /wp-admin/post-new.php6.10 ▲0.2299.27 ▲0.82
Media Library /wp-admin/upload.php3.29 ▲0.0634.32 ▼2.04
OAuth /wp-admin/admin.php?page=pnfw-oauth-identifier3.3131.06
Push Notifications /wp-admin/admin.php?page=push-notifications-for-wordpress3.2830.25
Debug /wp-admin/admin.php?page=pnfw-debug-identifier3.3331.98
Tokens /wp-admin/admin.php?page=pnfw-tokens-identifier3.3431.99
App Subscribers /wp-admin/admin.php?page=pnfw-app-subscribers-identifier3.3533.55
Settings /wp-admin/admin.php?page=pnfw-settings-identifier3.5338.58

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 241 new files
Database: 6 new tables, 8 new options
New tables
wp_push_excluded_categories
wp_push_tokens
wp_push_logs
wp_push_encryption_keys
wp_push_viewed
wp_push_sent
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
pnfw_posts_per_page
widget_theysaidso_widget
pnfw_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Push Notifications for WordPress (Lite)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.63 ▼0.631.81 ▼0.3643.30 ▼2.67
Dashboard /wp-admin2,253 ▲624.93 ▲0.0397.20 ▼5.1075.85 ▲30.49
Posts /wp-admin/edit.php2,136 ▲471.98 ▼0.0034.67 ▼6.1535.32 ▼3.23
Add New Post /wp-admin/post-new.php1,565 ▲5123.24 ▲5.66635.24 ▼26.6963.31 ▲10.42
Media Library /wp-admin/upload.php1,429 ▲384.07 ▼0.1197.28 ▼11.7375.29 ▲28.92
OAuth /wp-admin/admin.php?page=pnfw-oauth-identifier8242.0626.8024.03
Push Notifications /wp-admin/admin.php?page=push-notifications-for-wordpress8272.0125.3329.00
Debug /wp-admin/admin.php?page=pnfw-debug-identifier9812.0223.9930.57
Tokens /wp-admin/admin.php?page=pnfw-tokens-identifier1,0012.0627.3128.87
App Subscribers /wp-admin/admin.php?page=pnfw-app-subscribers-identifier9742.0523.2528.04
Settings /wp-admin/admin.php?page=pnfw-settings-identifier1,1553.1138.6864.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 6 tables
    • wp_push_logs
    • wp_push_excluded_categories
    • wp_push_encryption_keys
    • wp_push_sent
    • wp_push_tokens
    • wp_push_viewed
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • pnfw_posts_per_page
    • pnfw_db_version
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 95× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DeliteStudio\\Brick\\Math\\BigNumber' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/Brick/Math/BigInteger.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'DeliteStudio\\Jose\\Component\\Signature\\Serializer\\Serializer' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/Jose/Component/Signature/Serializer/CompactSerializer.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliteStudio\\Jose\\Component\\Core\\JWT' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/Jose/Component/Signature/JWS.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'DeliteStudio\\FG\\ASN1\\Universal\\ObjectIdentifier' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/FG/ASN1/Universal/RelativeObjectIdentifier.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'DeliteStudio\\FG\\ASN1\\ASNObject' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/FG/ASN1/AbstractTime.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'DeliteStudio\\FG\\ASN1\\AbstractString' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/FG/ASN1/Universal/PrintableString.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliteStudio\\Jose\\Component\\Signature\\Serializer\\JWSSerializer' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/Jose/Component/Signature/Serializer/Serializer.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'DeliteStudio\\FG\\ASN1\\Universal\\GraphicString' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/FG/ASN1/Universal/ObjectDescriptor.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'DeliteStudio\\FG\\ASN1\\ASNObject' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/FG/ASN1/ExplicitlyTaggedObject.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'DeliteStudio\\Jose\\Component\\KeyManagement\\Analyzer\\KeyAnalyzer' not found in wp-content/plugins/push-notifications-for-wp/src/DeliteStudio/Jose/Component/KeyManagement/Analyzer/OctAnalyzer.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === push-notifications-for-wp === )
Please take inspiration from this readme.txt

push-notifications-for-wp/push-notifications-for-wp.php Passed 13 tests

The main file in "Push Notifications for WordPress (Lite)" v. 6.4.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
79 characters long description:
Send push notifications to iOS and Android devices when you publish a new post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected17,222 lines of code in 230 files:
LanguageFilesBlank linesComment linesLines of code
PHP2174,4888,13516,248
JSON500934
Markdown424036
JavaScript3003
CSS1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.90
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces29
Interfaces27
Traits0
Classes186
▷ Abstract classes158.06%
▷ Concrete classes17191.94%
▷ Final classes3218.71%
Methods1,412
▷ Static methods24417.28%
▷ Public methods1,08676.91%
▷ Protected methods1339.42%
▷ Private methods19313.67%
Functions63
▷ Named functions2336.51%
▷ Anonymous functions4063.49%
Constants171
▷ Global constants158.77%
▷ Class constants15691.23%
▷ Public constants14894.87%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/icon-menu.png0.29KB0.20KB▼ 32.45%