78% all-push-notification

Code Review | All push notification for WP

WordPress plugin All push notification for WP scored78%from 54 tests.

About plugin

  • Plugin page: all-push-notifica...
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7
  • WordPress version: 6.3.1
  • First release: Aug 24, 2016
  • Latest release: Feb 20, 2017
  • Number of updates: 15
  • Update frequency: every 12.1 days
  • Top authors: gtlwpdev (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /7,549 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
Installer ran successfully

Server metrics [RAM: ▼0.50MB] [CPU: ▼17.66ms] Passed 4 tests

A check of server-side resources used by All push notification for WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1834.70 ▼15.42
Dashboard /wp-admin3.48 ▲0.1846.39 ▼2.65
Posts /wp-admin/edit.php3.60 ▲0.2444.82 ▼0.97
Add New Post /wp-admin/post-new.php3.36 ▼2.5336.36 ▼51.58
Media Library /wp-admin/upload.php3.41 ▲0.1835.17 ▲0.83
Custom Notification /wp-admin/admin.php?page=custom-PushNotifications-WP3.3732.54
Settings /wp-admin/admin.php?page=all-PushNotifications-WP-settings3.4044.24
All Push Notifications /wp-admin/admin.php?page=all-Pushnotifications-wp3.3834.09

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

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

Browser metrics Passed 4 tests

Checking browser requirements for All push notification for WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲7114.35 ▼0.211.56 ▼0.5938.42 ▼19.55
Dashboard /wp-admin2,238 ▲584.83 ▼0.8485.54 ▼11.0138.57 ▼4.45
Posts /wp-admin/edit.php2,143 ▲432.23 ▲0.2933.02 ▼3.2930.22 ▼4.10
Add New Post /wp-admin/post-new.php1,563 ▲2223.32 ▲0.25673.17 ▼19.7457.31 ▼2.06
Media Library /wp-admin/upload.php1,448 ▲484.51 ▲0.2195.40 ▲1.1944.10 ▼0.08
Custom Notification /wp-admin/admin.php?page=custom-PushNotifications-WP1,0492.2041.7542.80
Settings /wp-admin/admin.php?page=all-PushNotifications-WP-settings1,2963.3251.3527.85
All Push Notifications /wp-admin/admin.php?page=all-Pushnotifications-wp9711.8826.4027.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/all-push-notification/customrest-api-url.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/all-push-notification/all-push-notification-for-wp.php:9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/all-push-notification/pushnotification-admin/class-pushnotification-admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/all-push-notification/pushnotification/class-pushnotification.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/all-push-notification/pushnotification-admin/class-pushnotification-admin.php on line 3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/all-push-notification/pushnotification-admin/class-pushnotification-admin.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=custom-PushNotifications-WP
    • > Network (severe)
    wp-content/plugins/all-push-notification/css/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=custom-PushNotifications-WP
    • > Network (severe)
    wp-content/plugins/all-push-notification/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=custom-PushNotifications-WP
    • > Network (severe)
    wp-content/plugins/all-push-notification/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

all-push-notification/all-push-notification-for-wp.php 85% from 13 tests

The primary PHP file in "All push notification for WP" version 1.5.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("all-push-notification.php" instead of "all-push-notification-for-wp.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 161 characters long)

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
Everything looks great! No dangerous files found in this plugin2,304 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP9221821,152
CSS633821,149
JavaScript30193

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.75
▷ Minimum class complexity7.00
▷ Maximum class complexity13.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.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
19 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%
css/images/ui-icons_228ef1_256x240.png4.44KB4.17KB▼ 6.02%
css/images/ui-bg_flat_10_000000_40x100.png0.20KB0.08KB▼ 57.56%
css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
css/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%