77% oliver-pos

Code Review | Oliver POS - A WooCommerce Point of Sale (POS)

WordPress plugin Oliver POS - A WooCommerce Point of Sale (POS) scored77%from 54 tests.

About plugin

  • Plugin page: oliver-pos
  • Plugin version: 2.4.1.7
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Apr 17, 2019
  • Latest release: Nov 20, 2023
  • Number of updates: 95
  • Update frequency: every 17.9 days
  • Top authors: oliverpos (100%)

Code review

54 tests

User reviews

70 reviews

Install metrics

1,000+ active /56,069 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Oliver POS - A WooCommerce Point of Sale (POS)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.12 ▲3.20
Dashboard /wp-admin3.31 ▲0.0045.05 ▼2.86
Posts /wp-admin/edit.php3.36 ▲0.0046.00 ▼4.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0077.44 ▼11.85
Media Library /wp-admin/upload.php3.23 ▲0.0029.20 ▼2.06

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 124 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Oliver POS - A WooCommerce Point of Sale (POS)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲1814.25 ▼0.121.72 ▼0.1846.28 ▲9.74
Dashboard /wp-admin2,192 ▲155.64 ▲0.0690.81 ▼5.9642.18 ▼5.32
Posts /wp-admin/edit.php2,100 ▼32.00 ▲0.0139.72 ▲0.6735.93 ▼1.29
Add New Post /wp-admin/post-new.php1,526 ▼022.99 ▼0.58640.11 ▼17.8662.92 ▲3.36
Media Library /wp-admin/upload.php1,403 ▲64.19 ▼0.1399.20 ▲1.0244.05 ▲1.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/oliver-pos/woocommerce/single-product/add-to-cart/op_woo_footer.php
    • > /wp-content/plugins/oliver-pos/includes/deactivation.php
    • > /wp-content/plugins/oliver-pos/includes/views/backend/loader.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: product in wp-content/plugins/oliver-pos/woocommerce/single-product/add-to-cart/op_woo_footer.php on line 105
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/oliver-pos/includes/include-productx-loader.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/oliver-pos/woocommerce/single-product/add-to-cart/op_woo_header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_sale_price() on null in wp-content/plugins/oliver-pos/woocommerce/single-product/add-to-cart/op_woo_footer.php:105

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #10, #11, #12, #13, #14, #15, #16, #17, #9 in oliver-pos/assets to your readme.txt
The official readme.txt is a good inspiration

oliver-pos/oliver-pos.php 85% from 13 tests

"Oliver POS - A WooCommerce Point of Sale (POS)" version 2.4.1.7'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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("5.9" instead of "3.8")

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
Good job! No executable or dangerous file extensions detected24,917 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP489863,03610,654
CSS6615868,446
SVG25005,417
JavaScript35925330
PO File1272870

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity64.17
▷ Minimum class complexity1.00
▷ Maximum class complexity410.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods395
▷ Static methods5213.16%
▷ Public methods32983.29%
▷ Protected methods82.03%
▷ Private methods5814.68%
Functions38
▷ Named functions2463.16%
▷ Anonymous functions1436.84%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.57MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/resource/img/CustomerSupportPerson_1.png486.96KB168.75KB▼ 65.35%
public/resource/img/service_lock.png0.27KB0.22KB▼ 19.71%
public/resource/img/nexcess-logo-md1.png3.96KB3.47KB▼ 12.22%
public/resource/img/oliver_icon_121.png1.23KB0.85KB▼ 30.49%
public/resource/img/lock.png0.33KB0.24KB▼ 28.36%