84% posit-pos-integration-for-woocommerce

Code Review | POSIT POS integration for WooCommerce

WordPress plugin POSIT POS integration for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: posit-pos-integra...
  • Plugin version: 1.03
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3.2
  • WordPress version: 6.3.1
  • First release: May 4, 2023
  • Latest release: Nov 2, 2023
  • Number of updates: 18
  • Update frequency: every 10.2 days
  • Top authors: royposit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /210 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
Install script ran successfully

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

An overview of server-side resources used by POSIT POS integration for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.06 ▼5.66
Dashboard /wp-admin3.32 ▼0.0345.91 ▼19.86
Posts /wp-admin/edit.php3.37 ▲0.0148.52 ▲0.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.56 ▼11.52
Media Library /wp-admin/upload.php3.24 ▲0.0137.84 ▼1.33

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

POSIT POS integration for WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7914.27 ▲0.111.87 ▲0.1840.37 ▼6.60
Dashboard /wp-admin2,195 ▲145.62 ▼0.0389.17 ▼9.6738.69 ▼1.26
Posts /wp-admin/edit.php2,097 ▼32.01 ▼0.0438.92 ▼0.2634.48 ▼1.34
Add New Post /wp-admin/post-new.php1,528 ▲223.14 ▲0.08693.05 ▼36.6350.17 ▼10.86
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0193.73 ▼6.6543.46 ▼2.39

Uninstaller [IO: ▲0.00MB] [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: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/posit-pos-integration-for-woocommerce/trunk/posit-wc-integration.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posit-pos-integration-for-woocommerce/posit-wc.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/posit-pos-integration-for-woocommerce/trunk/posit-wc.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/posit-pos-integration-for-woocommerce/posit-wc-integration.php:10

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: woocommerce, pos, posit

posit-pos-integration-for-woocommerce/posit-wc.php 92% from 13 tests

The main file in "POSIT POS integration for WooCommerce" v. 1.03 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("posit-pos-integration-for-woocommerce.php" instead of "posit-wc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin464 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP265104464

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity24.00
▷ Minimum class complexity7.00
▷ Maximum class complexity41.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods3088.24%
▷ Protected methods00.00%
▷ Private methods411.76%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin