83% oneclick-whatsapp-order

Code Review | OneClick Chat to Order

WordPress plugin OneClick Chat to Order scored83%from 54 tests.

About plugin

  • Plugin page: oneclick-whatsapp...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2019
  • Latest release: Nov 16, 2023
  • Number of updates: 65
  • Update frequency: every 26.9 days
  • Top authors: walterpinem (100%)

Code review

54 tests

User reviews

69 reviews

Install metrics

30,000+ active /180,905 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼20.85ms] Passed 4 tests

A check of server-side resources used by OneClick Chat to Order
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0642.52 ▼45.71
Dashboard /wp-admin3.53 ▲0.1851.31 ▼9.65
Posts /wp-admin/edit.php3.58 ▼0.2748.23 ▼6.27
Add New Post /wp-admin/post-new.php6.13 ▲0.2483.54 ▼21.77
Media Library /wp-admin/upload.php3.45 ▲0.2235.30 ▲2.89
Global Settings /wp-admin/admin.php?page=wa-order&tab=welcome3.4230.90
Add New Number /wp-admin/post-new.php?post_type=wa-order-numbers3.5960.66
WhatsApp Numbers /wp-admin/edit.php?post_type=wa-order-numbers3.4936.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by OneClick Chat to Order
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,542 ▼24514.23 ▲0.100.80 ▼1.4017.09 ▼26.10
Dashboard /wp-admin2,267 ▲935.55 ▼0.0498.49 ▼1.4682.29 ▲39.83
Posts /wp-admin/edit.php2,172 ▲752.08 ▲0.1238.08 ▲1.1333.45 ▼2.32
Add New Post /wp-admin/post-new.php1,746 ▲21721.92 ▼1.35820.41 ▲174.6184.32 ▲30.49
Media Library /wp-admin/upload.php1,466 ▲664.11 ▲0.0198.34 ▼7.2177.03 ▲33.20
Global Settings /wp-admin/admin.php?page=wa-order&tab=welcome1,6659.05304.16115.32
Add New Number /wp-admin/post-new.php?post_type=wa-order-numbers1,5322.4547.8955.03
WhatsApp Numbers /wp-admin/edit.php?post_type=wa-order-numbers1,1391.9633.1533.93

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Almost there! Just fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oneclick-whatsapp-order/includes/buttons/wa-order-cart-page.php:234
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/oneclick-whatsapp-order/includes/buttons/wa-order-thank-you.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/oneclick-whatsapp-order/includes/buttons/wa-order-single-product.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/oneclick-whatsapp-order/includes/wa-metabox.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oneclick-whatsapp-order/includes/buttons/wa-order-display-options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oneclick-whatsapp-order/includes/buttons/wa-order-floating-button.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oneclick-whatsapp-order/includes/multiple-numbers.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oneclick-whatsapp-order/includes/buttons/wa-order-shop-archive.php:110
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/oneclick-whatsapp-order/includes/number-redirect.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: order, product, whatsapp, woocommerce, whatsapp order...

oneclick-whatsapp-order/whatsapp-order.php 77% from 13 tests

The entry point to "OneClick Chat to Order" version 1.0.5 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("oneclick-whatsapp-order.php" instead of "whatsapp-order.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 267 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,299 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP173044534,444
PO File37248532,360
CSS5174461
JavaScript431333
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods00.00%
▷ Private methods225.00%
Functions81
▷ Named functions7896.30%
▷ Anonymous functions33.70%
Constants2
▷ Global constants2100.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
11 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/gdpr-ready.png5.23KB2.35KB▼ 55.13%
assets/images/whatsapp-menu.png0.59KB0.68KB0.00%
assets/images/documentation.png5.05KB2.33KB▼ 53.95%
assets/images/display-this-or-hide-that.png4.80KB2.05KB▼ 57.38%
assets/images/fancy-floating-button.png4.90KB2.11KB▼ 56.88%