58% notifier

Code Review | WANotifier - Send Message Notifications Using Cloud API

WordPress plugin WANotifier - Send Message Notifications Using Cloud API scored58%from 54 tests.

About plugin

  • Plugin page: notifier
  • Plugin version: 2.4.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2022
  • Latest release: Nov 3, 2023
  • Number of updates: 96
  • Update frequency: every 4.8 days
  • Top authors: ramshengale (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /6,822 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.44MB] [CPU: ▼40.98ms] Passed 4 tests

A check of server-side resources used by WANotifier - Send Message Notifications Using Cloud API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0717.22 ▼26.31
Dashboard /wp-admin3.59 ▲0.2423.32 ▼36.57
Posts /wp-admin/edit.php3.59 ▲0.2319.32 ▼25.25
Add New Post /wp-admin/post-new.php3.58 ▼2.3021.89 ▼75.77
Media Library /wp-admin/upload.php3.59 ▲0.3622.00 ▼13.56
Scheduled Actions /wp-admin/tools.php?page=action-scheduler3.5820.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 189 new files
Database: 4 new tables, 10 new options
New tables
wp_actionscheduler_actions
wp_actionscheduler_logs
wp_actionscheduler_claims
wp_actionscheduler_groups
New WordPress options
action_scheduler_hybrid_store_demarkation
widget_recent-posts
db_upgraded
schema-ActionScheduler_StoreSchema
schema-ActionScheduler_LoggerSchema
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
action_scheduler_lock_async-request-runner
theysaidso_admin_options

Browser metrics Passed 4 tests

WANotifier - Send Message Notifications Using Cloud API: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8414.37 ▲0.102.16 ▲0.2444.20 ▲1.62
Dashboard /wp-admin2,214 ▲375.62 ▼0.0094.61 ▼5.2442.53 ▼1.08
Posts /wp-admin/edit.php2,116 ▲192.01 ▼0.0037.91 ▼0.5734.06 ▼5.81
Add New Post /wp-admin/post-new.php1,544 ▲1822.80 ▼0.61621.09 ▼1.5153.98 ▲6.17
Media Library /wp-admin/upload.php1,413 ▲164.27 ▲0.09101.30 ▲2.7043.66 ▲0.86
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2641.8226.1432.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/notifier/includes/class-notifier.php+243
    include_once(wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-session.php): failed to open stream: No such file or directory
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_actionscheduler_logs
    • wp_actionscheduler_actions
    • wp_actionscheduler_claims
    • wp_actionscheduler_groups
  • Zombie WordPress options were found after uninstall: 10 options
    • can_compress_scripts
    • widget_recent-comments
    • action_scheduler_lock_async-request-runner
    • schema-ActionScheduler_StoreSchema
    • action_scheduler_hybrid_store_demarkation
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • schema-ActionScheduler_LoggerSchema
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=action-scheduler
    • > Warning in wp-content/plugins/notifier/includes/class-notifier.php+243
    include_once(wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-session.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/tools.php?page=action-scheduler
    • > Warning in wp-content/plugins/notifier/includes/class-notifier.php+243
    include_once(): Failed opening 'wp-content/plugins/woocommerce/includes/abstracts/abstract-wc-session.php' for inclusion (include_path='.:/usr/share/php')

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 take a closer look at the following
  • 80× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_Schema' not found in wp-content/plugins/notifier/libraries/action-scheduler/classes/schema/ActionScheduler_StoreSchema.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/notifier/libraries/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/notifier/libraries/action-scheduler/tests/phpunit/versioning/ActionScheduler_Versions_Test.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/notifier/libraries/action-scheduler/classes/WP_CLI/Migration_Command.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/notifier/libraries/action-scheduler/classes/WP_CLI/ActionScheduler_WPCLI_Clean_Command.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/notifier/libraries/action-scheduler/classes/data-stores/ActionScheduler_wpPostStore.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/notifier/libraries/action-scheduler/tests/phpunit/procedural_api/procedural_api_Test.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/notifier/libraries/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'CronExpression_FieldInterface' not found in wp-content/plugins/notifier/libraries/action-scheduler/lib/cron-expression/CronExpression_AbstractField.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CronExpression_AbstractField' not found in wp-content/plugins/notifier/libraries/action-scheduler/lib/cron-expression/CronExpression_DayOfWeekField.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in notifier/assets to your readme.txt
The official readme.txt is a good inspiration

notifier/notifier.php 85% from 13 tests

"WANotifier - Send Message Notifications Using Cloud API" version 2.4.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "5.7")
  • Description: Keep the plugin description shorter than 140 characters (currently 151 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin16,313 lines of code in 174 files:
LanguageFilesBlank linesComment linesLines of code
PHP1433,0806,33913,904
CSS2588979
Markdown113780670
JavaScript45152283
Bourne Shell12311147
SVG400129
XML21055
HTML28052
Sass110047
JSON20029
YAML22018

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.54
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces3
Interfaces3
Traits0
Classes124
▷ Abstract classes1612.90%
▷ Concrete classes10887.10%
▷ Final classes00.00%
Methods924
▷ Static methods17418.83%
▷ Public methods74180.19%
▷ Protected methods14515.69%
▷ Private methods384.11%
Functions169
▷ Named functions3621.30%
▷ Anonymous functions13378.70%
Constants45
▷ Global constants1124.44%
▷ Class constants3475.56%
▷ Public constants34100.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
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libraries/action-scheduler/docs/mstile-150x150.png4.15KB3.67KB▼ 11.47%
libraries/action-scheduler/docs/favicon-16x16.png0.39KB0.38KB▼ 3.02%
libraries/action-scheduler/docs/android-chrome-192x192.png6.77KB2.46KB▼ 63.68%
libraries/action-scheduler/docs/apple-touch-icon.png6.77KB2.46KB▼ 63.68%
libraries/action-scheduler/docs/android-chrome-256x256.png2.93KB3.03KB0.00%