78% chat-notifications-for-woocommerce

Code Review | Chat notifications for Woocommerce

WordPress plugin Chat notifications for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: chat-notification...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Nov 21, 2022
  • Number of updates: 16
  • Update frequency: every 1.3 days
  • Top authors: algaweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /637 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.66ms] Passed 4 tests

Analyzing server-side resources used by Chat notifications for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.83 ▲2.31
Dashboard /wp-admin3.31 ▲0.0049.06 ▼5.83
Posts /wp-admin/edit.php3.36 ▲0.0047.49 ▼5.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.23 ▼8.74
Media Library /wp-admin/upload.php3.23 ▲0.0037.82 ▲1.78

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Chat notifications for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.35 ▼0.212.18 ▲0.2145.17 ▲1.76
Dashboard /wp-admin2,198 ▲215.61 ▼0.0287.12 ▼16.3839.51 ▼3.84
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0341.02 ▲2.3934.97 ▼2.68
Add New Post /wp-admin/post-new.php1,528 ▲223.17 ▲0.04661.87 ▼31.3763.71 ▲10.46
Media Library /wp-admin/upload.php1,397 ▼34.23 ▲0.08100.41 ▼3.2946.97 ▲1.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% 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 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/chat-notifications-for-woocommerce/public/partials/chat-notifications-for-woocommerce-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/chat-notifications-for-woocommerce/admin/partials/chat-notifications-for-woocommerce-settings.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/chat-notifications-for-woocommerce/admin/partials/chat-notifications-for-woocommerce-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/chat-notifications-for-woocommerce/admin/partials/chat-notifications-for-woocommerce-templates.php:21

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: woocommerce order notifications, woocommerce notifications, woocommerce whatsapp, whatsapp, whatsapp order notifications

chat-notifications-for-woocommerce/chat-notifications-for-woocommerce.php 92% from 13 tests

The main PHP script in "Chat notifications for Woocommerce" version 1.0.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,157 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP16251635993
JavaScript4267392
CSS213972

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.63
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods47
▷ Static methods817.02%
▷ Public methods4289.36%
▷ Protected methods00.00%
▷ Private methods510.64%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/Wafwc_icon.png1.69KB0.59KB▼ 65.16%