78% wp-whatsapp

Code Review | WP Chat App

WordPress plugin WP Chat App scored78%from 54 tests.

About plugin

  • Plugin page: wp-whatsapp
  • Plugin version: 3.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2018
  • Latest release: Sep 11, 2023
  • Number of updates: 72
  • Update frequency: every 23.8 days
  • Top authors: ninjateam (100%)

Code review

54 tests

User reviews

134 reviews

Install metrics

90,000+ active /691,804 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.61MB] [CPU: ▼0.74ms] Passed 4 tests

An overview of server-side resources used by WP Chat App
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.6746.30 ▲4.27
Dashboard /wp-admin3.97 ▲0.6357.37 ▲4.20
Posts /wp-admin/edit.php4.02 ▲0.6353.92 ▲5.42
Add New Post /wp-admin/post-new.php6.55 ▲0.6387.57 ▼13.71
Media Library /wp-admin/upload.php3.83 ▲0.5739.73 ▲2.30
Add New account /wp-admin/post-new.php?post_type=whatsapp-accounts4.0151.89
Go Pro /wp-admin/admin.php?page=go_whatsapp_pro3.7936.14
Settings /wp-admin/admin.php?page=nta_whatsapp_setting3.8638.66
Recommended Plugins /wp-admin/admin.php?page=nta_whatsapp_recommended_plugins3.7935.08
Floating Widget /wp-admin/admin.php?page=nta_whatsapp_floating_widget3.9040.84
All Accounts /wp-admin/edit.php?post_type=whatsapp-accounts3.9342.57

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: no files
Database: no new tables, 12 new options
New WordPress options
njt_notification_filebird_cross
widget_recent-posts
widget_theysaidso_widget
njt_wa_version
njt_wa_review
can_compress_scripts
db_upgraded
theysaidso_admin_options
njt_wa_first_time_active
nta_wa_restored
...

Browser metrics 75% from 4 tests

An overview of browser requirements for WP Chat App
You may want to improve the following
  • Nodes: For the best user experience, please reduce the number of DOM nodes under 25,000 (currently 43,109 on /wp-admin/admin.php?page=go_whatsapp_pro)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲21213.60 ▼0.785.57 ▲3.5119.43 ▼26.48
Dashboard /wp-admin2,389 ▲1984.89 ▼1.01102.69 ▼13.8878.49 ▲31.17
Posts /wp-admin/edit.php2,299 ▲2102.08 ▲0.0336.04 ▼4.53103.46 ▲67.07
Add New Post /wp-admin/post-new.php6,296 ▲4,78218.99 ▲1.44949.44 ▲245.6852.30 ▼6.31
Media Library /wp-admin/upload.php1,502 ▲1174.26 ▲0.0997.39 ▼1.8675.32 ▲31.89
Add New account /wp-admin/post-new.php?post_type=whatsapp-accounts5,2865.43103.94107.86
Go Pro /wp-admin/admin.php?page=go_whatsapp_pro43,1098.93253.35184.63
Settings /wp-admin/admin.php?page=nta_whatsapp_setting1,3703.1257.9863.07
Recommended Plugins /wp-admin/admin.php?page=nta_whatsapp_recommended_plugins1,1212.2629.6431.96
Floating Widget /wp-admin/admin.php?page=nta_whatsapp_floating_widget2,7659.97208.9035.38
All Accounts /wp-admin/edit.php?post_type=whatsapp-accounts1,1772.0031.8330.31

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 12 options
    • can_compress_scripts
    • njt_popup_filebird_cross
    • njt_wa_first_time_active
    • njt_notification_filebird_cross
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • njt_wa_review
    • nta_wa_restored
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-whatsapp/views/meta-button-style.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/wp-whatsapp/views/settings.php:11
    • > PHP Notice
      Undefined variable: recommended_plugins in wp-content/plugins/wp-whatsapp/includes/Recommended/views/content.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-whatsapp/views/woocommerce-button.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'NTA_WhatsApp\\Helper' not found in wp-content/plugins/wp-whatsapp/views/selected-accounts.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-whatsapp/views/design-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-whatsapp/views/display-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-whatsapp/views/meta-accounts.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-whatsapp/views/analytics.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/wp-whatsapp/views/floating-widget-settings.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/post-new.php?post_type=whatsapp-accounts
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=go_whatsapp_pro
    • > Security (warning) in unknown
    security - Error with Feature-Policy header: Unrecognized feature: 'speaker'.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=nta_whatsapp_floating_widget
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: whatsapp business, woocommerce whatsapp, click to chat, wp social chat, join chat...

wp-whatsapp/whatsapp.php 85% from 13 tests

The main PHP file in "WP Chat App" ver. 3.4.6 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-whatsapp.php" instead of "whatsapp.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin5,145 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
PHP30410653,725
CSS68927597
JavaScript91216341
SVG903272
PO File17991189
XML10021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.35
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods140
▷ Static methods3222.86%
▷ Public methods13294.29%
▷ Protected methods00.00%
▷ Private methods85.71%
Functions11
▷ Named functions436.36%
▷ Anonymous functions763.64%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/whatsapp-button-preview.png6.83KB7.06KB0.00%
assets/img/woo_settings/after_long_desc.png1.18KB0.99KB▼ 16.10%
assets/img/woo_settings/before_add_to_cart.png1.14KB0.96KB▼ 15.87%
assets/img/woo_settings/after_short_desc.png1.13KB0.95KB▼ 16.00%
assets/img/FB_Wireframe.png10.56KB4.88KB▼ 53.83%