83% woo-point-of-salepos

Code Review | WooCommerce Point Of Sale (POS)

WordPress plugin WooCommerce Point Of Sale (POS) scored83%from 54 tests.

About plugin

  • Plugin page: woo-point-of-salepos
  • Plugin version: 1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.x-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2018
  • Latest release: Feb 21, 2023
  • Number of updates: 12
  • Update frequency: every 129.3 days
  • Top authors: infosoftplugin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /4,240 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.35MB] [CPU: ▼1.03ms] Passed 4 tests

Server-side resources used by WooCommerce Point Of Sale (POS)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3446.98 ▲3.84
Dashboard /wp-admin3.70 ▲0.3947.52 ▲2.89
Posts /wp-admin/edit.php3.75 ▲0.3946.39 ▲2.13
Add New Post /wp-admin/post-new.php6.22 ▲0.3393.65 ▼10.34
Media Library /wp-admin/upload.php3.56 ▲0.3336.14 ▲1.22

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 325 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooCommerce Point Of Sale (POS): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.17 ▼0.551.88 ▲0.1437.98 ▼6.90
Dashboard /wp-admin2,201 ▲305.64 ▲0.0681.23 ▼4.3337.79 ▼2.10
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0432.92 ▼8.2334.70 ▼2.93
Add New Post /wp-admin/post-new.php1,540 ▲518.65 ▲0.38605.66 ▼15.9564.12 ▼12.37
Media Library /wp-admin/upload.php1,406 ▲124.21 ▼0.0496.12 ▼1.3644.15 ▲3.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'ICWCPOS_FUNCTION' not found in wp-content/plugins/woo-point-of-salepos/includes/icwcpos_front_product_price.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/woo-point-of-salepos/template/template.php:1

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)
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (screenshot-1.jpg), #2 (screenshot-2.jpg), #3 (screenshot-3.jpg), #4 (screenshot-4.jpg), #5 (screenshot-5.jpg)
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

woo-point-of-salepos/woocommerce-point-of-sale-pos.php 69% from 13 tests

"WooCommerce Point Of Sale (POS)" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires at least: Periods and digits should be used for the required version number (ex. "7.0" instead of "3.5.x")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-point-of-salepos.php" instead of "woocommerce-point-of-sale-pos.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected103,672 lines of code in 206 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript7810,33121,26489,689
HTML40245264,575
PHP178884913,362
SVG563703,002
Markdown344001,361
CSS520593975
JSON700708

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity29.31
▷ Minimum class complexity1.00
▷ Maximum class complexity92.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods133
▷ Static methods00.00%
▷ Public methods13198.50%
▷ Protected methods10.75%
▷ Private methods10.75%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
72 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/amcharts/patterns/white/pattern8.png0.16KB0.10KB▼ 36.25%
assets/amcharts/images/exportWhite.png0.21KB0.13KB▼ 38.03%
assets/amcharts/patterns/black/pattern14.png0.16KB0.10KB▼ 36.25%
assets/amcharts/patterns/white/pattern14.png0.16KB0.10KB▼ 36.65%
assets/amcharts/patterns/white/pattern20.png0.15KB0.10KB▼ 34.18%