10% free-web-push-notification

Code Review | EPush Notifications

WordPress plugin EPush Notifications scored10%from 54 tests.

About plugin

  • Plugin page: free-web-push-not...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 29, 2018
  • Latest release: Nov 9, 2019
  • Number of updates: 52
  • Update frequency: every 12.5 days
  • Top authors: excellentwebworld123 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /7,394 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/free-web-push-notification/cls/fwpn_push_api.php+183
    Non-static method fwpn_eww_epush_lic_class::fwpn_setup() should not be called statically

Server metrics [RAM: ▼1.80MB] [CPU: ▼54.99ms] Passed 4 tests

Analyzing server-side resources used by EPush Notifications
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.276.52 ▼43.64
Dashboard /wp-admin2.21 ▼1.098.45 ▼47.26
Posts /wp-admin/edit.php2.21 ▼1.147.50 ▼45.58
Add New Post /wp-admin/post-new.php2.21 ▼3.688.77 ▼83.47
Media Library /wp-admin/upload.php2.21 ▼1.026.44 ▼27.83

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 25 new files
Database: 2 new tables, 10 new options
New tables
wp_push_notification
wp_visitor_data
New WordPress options
subscriber
widget_recent-comments
widget_recent-posts
fwpn_db_version
default_post
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
subscriber_api

Browser metrics Passed 4 tests

An overview of browser requirements for EPush Notifications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,010 ▲24915.33 ▲0.943.84 ▲2.0135.09 ▼10.41
Dashboard /wp-admin2,379 ▲1736.58 ▲1.68139.14 ▲23.5441.74 ▲0.07
Posts /wp-admin/edit.php2,281 ▲1843.40 ▲1.3954.46 ▲17.3139.12 ▲4.40
Add New Post /wp-admin/post-new.php6,261 ▲4,70725.96 ▲7.90881.90 ▲250.7338.64 ▼17.72
Media Library /wp-admin/upload.php1,418 ▲214.15 ▼0.1283.48 ▼15.7843.63 ▲1.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/free-web-push-notification/cls/fwpn_push_api.php+183
    Non-static method fwpn_eww_epush_lic_class::fwpn_setup() should not be called statically
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_visitor_data
    • wp_push_notification
  • The uninstall procedure has failed, leaving 10 options in the database
    • fwpn_db_version
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • subscriber
    • subscriber_api
    • widget_theysaidso_widget
    • default_post
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/free-web-push-notification/cls/fwpn_push_register_options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/free-web-push-notification/cls/template/fwpn_push_option.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/free-web-push-notification/cls/fwpn_push_api.php:70

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: push, web push notifications, desktop notifications, push notifications, push api

free-web-push-notification/free-web-push-notification.php Passed 13 tests

The main PHP script in "EPush Notifications" version 1.2 is automatically included on every request by WordPress
90 characters long description:
Excellent Web World is an IT company focus on Web Development and Application Development.

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
Good job! No executable or dangerous file extensions detected874 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP1230655
JavaScript300217
CSS1001
JSON1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.90
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.37
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 1.08MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/firebase5.png108.41KB41.04KB▼ 62.15%
img/firebase6.png171.76KB61.93KB▼ 63.94%
img/firebase4.png101.28KB39.90KB▼ 60.61%
img/firebase2.png171.98KB64.58KB▼ 62.45%
img/firebase3.png385.83KB175.26KB▼ 54.58%