78% wp-push-notification-firebase

Code Review | WP Firebase Push Notification

WordPress plugin WP Firebase Push Notification scored78%from 54 tests.

About plugin

  • Plugin page: wp-push-notificat...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2019
  • Latest release: Dec 17, 2019
  • Number of updates: 5
  • Update frequency: every 3.8 days
  • Top authors: skywaveinfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.42ms] Passed 4 tests

An overview of server-side resources used by WP Firebase Push Notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.65 ▲0.48
Dashboard /wp-admin3.37 ▲0.0246.47 ▼15.75
Posts /wp-admin/edit.php3.48 ▲0.1249.40 ▼3.37
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.92 ▼15.02
Media Library /wp-admin/upload.php3.29 ▲0.0637.80 ▲2.35
Push Notification /wp-admin/admin.php?page=notification3.2631.80
Settings /wp-admin/admin.php?page=notify-settings3.2632.10

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Firebase Push Notification
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.22 ▼1.441.96 ▲0.2242.71 ▲1.34
Dashboard /wp-admin2,228 ▲425.85 ▼0.0496.82 ▼7.7340.91 ▼4.01
Posts /wp-admin/edit.php2,114 ▲252.04 ▲0.0341.02 ▲2.5736.62 ▲5.09
Add New Post /wp-admin/post-new.php1,558 ▲3818.44 ▼4.51666.24 ▲7.6256.68 ▲11.33
Media Library /wp-admin/upload.php1,404 ▲224.21 ▼0.0297.01 ▼3.7642.25 ▲1.47
Push Notification /wp-admin/admin.php?page=notification8192.0324.1228.93
Settings /wp-admin/admin.php?page=notify-settings9782.0623.5534.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-push-notification-firebase/templates/brodcast_message.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-push-notification-firebase/templates/settings.php:57

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (How it look like), #2 (How to add Firebase API key), #3 (How to send Notification)
You can look at the official readme.txt

wp-push-notification-firebase/wp_push_notification_firebase.php 92% from 13 tests

"WP Firebase Push Notification" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-push-notification-firebase.php" instead of "wp_push_notification_firebase.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
Success! There were no dangerous files found in this plugin456 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33432302
CSS1306154

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG images were found in this plugin