78% notificare-website-push

Code Review | Notificare

WordPress plugin Notificare scored78%from 54 tests.

About plugin

  • Plugin page: notificare-websit...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 6.3.1
  • First release: Feb 15, 2016
  • Latest release: May 21, 2019
  • Number of updates: 40
  • Update frequency: every 29.8 days
  • Top authors: jjonthemix (82.5%)silentjohnny (20%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,603 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.89ms] Passed 4 tests

A check of server-side resources used by Notificare
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.64 ▼0.98
Dashboard /wp-admin3.40 ▲0.0947.56 ▼5.87
Posts /wp-admin/edit.php3.51 ▲0.1550.02 ▼2.73
Add New Post /wp-admin/post-new.php6.00 ▲0.1186.25 ▼13.99
Media Library /wp-admin/upload.php3.32 ▲0.0940.21 ▲4.29
Notificare /wp-admin/options-general.php?page=Notificare3.3135.15

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 20 new options
New WordPress options
notificare_googleMapsAPIKey
can_compress_scripts
widget_recent-comments
notificare_serviceWorker
widget_theysaidso_widget
notificare_overrideManifest
widget_recent-posts
notificare_gcmSender
notificare_applicationName
notificare_applicationVersion
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Notificare
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.66 ▼0.753.20 ▲1.5140.62 ▼3.19
Dashboard /wp-admin2,214 ▲264.82 ▼0.08105.90 ▲0.2239.57 ▼4.71
Posts /wp-admin/edit.php2,097 ▲82.03 ▼0.0536.44 ▼8.5031.97 ▼6.12
Add New Post /wp-admin/post-new.php1,539 ▲1623.30 ▲0.19649.75 ▼8.5956.50 ▲0.70
Media Library /wp-admin/upload.php1,393 ▲54.19 ▲0.04108.45 ▼13.7047.16 ▼1.09
Notificare /wp-admin/options-general.php?page=Notificare9662.1822.8231.92

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/notificare-website-push/includes/config.js.php
    • > /wp-content/plugins/notificare-website-push/includes/manifest.json.php
    • > /wp-content/plugins/notificare-website-push/includes/push-worker.js.php
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: gcmSender in wp-content/plugins/notificare-website-push/includes/manifest.json.php on line 7
    • > PHP Notice
      Undefined index: soundsDir in wp-content/plugins/notificare-website-push/includes/config.js.php on line 9
    • > PHP Notice
      Undefined index: serviceWorkerScope in wp-content/plugins/notificare-website-push/includes/push-worker.js.php on line 3
    • > PHP Notice
      Undefined index: app in wp-content/plugins/notificare-website-push/includes/manifest.json.php on line 4
    • > PHP Notice
      Undefined index: appVersion in wp-content/plugins/notificare-website-push/includes/config.js.php on line 6
    • > PHP Notice
      Undefined index: appHost in wp-content/plugins/notificare-website-push/includes/config.js.php on line 5
    • > PHP Notice
      Undefined index: serviceWorker in wp-content/plugins/notificare-website-push/includes/config.js.php on line 10
    • > PHP Notice
      Undefined index: appKey in wp-content/plugins/notificare-website-push/includes/config.js.php on line 7
    • > PHP Notice
      Undefined index: app in wp-content/plugins/notificare-website-push/includes/manifest.json.php on line 3
    • > PHP Notice
      Undefined index: serviceWorkerScope in wp-content/plugins/notificare-website-push/includes/config.js.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: push notifications, edge push, firefox push, chrome push, safari push

notificare-website-push/notificare.php 85% from 13 tests

"Notificare" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("notificare-website-push.php" instead of "notificare.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
Everything looks great! No dangerous files found in this plugin2,578 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript73934451,902
PHP15154524462
PO File26968180
CSS24822
JSON10012

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin