71% woo-ups-pickup

Code Review | OPSI Israel Domestic Shipments

WordPress plugin OPSI Israel Domestic Shipments scored71%from 54 tests.

About plugin

  • Plugin page: woo-ups-pickup
  • Plugin version: 2.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 1, 2017
  • Latest release: Oct 2, 2023
  • Number of updates: 79
  • Update frequency: every 29.7 days
  • Top authors: petershe (93.67%)ashamil (7.59%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.45MB] [CPU: ▼5.93ms] Passed 4 tests

A check of server-side resources used by OPSI Israel Domestic Shipments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4141.99 ▼0.11
Dashboard /wp-admin3.82 ▲0.4751.99 ▼8.15
Posts /wp-admin/edit.php3.87 ▲0.5147.31 ▼2.35
Add New Post /wp-admin/post-new.php6.34 ▲0.4584.50 ▼13.09
Media Library /wp-admin/upload.php3.68 ▲0.4538.09 ▲7.75
Change Pickup Point /wp-admin/admin.php?page=change-pickup-point3.5529.94

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 87 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

OPSI Israel Domestic Shipments: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲3113.36 ▼1.291.75 ▼0.1842.82 ▼2.29
Dashboard /wp-admin2,211 ▲265.85 ▼0.01122.42 ▲12.7042.67 ▲2.99
Posts /wp-admin/edit.php2,088 ▼12.02 ▲0.0233.66 ▼4.9334.73 ▼1.16
Add New Post /wp-admin/post-new.php1,530 ▲1123.39 ▲0.30682.49 ▲8.8661.43 ▲5.64
Media Library /wp-admin/upload.php1,390 ▲24.17 ▼0.02102.45 ▲8.6344.63 ▲1.48
Change Pickup Point /wp-admin/admin.php?page=change-pickup-point15,3907.85187.2525.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=change-pickup-point
    • > Notice in wp-content/plugins/woo-ups-pickup/woocommerce-ups-pickups.php+386
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=change-pickup-point
    • > Notice in wp-content/plugins/woo-ups-pickup/woocommerce-ups-pickups.php+415
    Undefined index: order_id

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
  • 19× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Ups\\Service\\AbstractRestApiService' not found in wp-content/plugins/woo-ups-pickup/includes/ups/Service/GetInformationService.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Ups\\Service\\AbstractService' not found in wp-content/plugins/woo-ups-pickup/includes/ups/Service/Authenticate.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Ups\\Service\\AbstractRestApiService' not found in wp-content/plugins/woo-ups-pickup/includes/ups/Service/CreateXmlOrderService.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-ups-pickup/includes/templates/email/tracking-number.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Ups\\Service\\AbstractService' not found in wp-content/plugins/woo-ups-pickup/includes/ups/Service/InsertPickupDrop.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Ups\\Service\\AbstractService' not found in wp-content/plugins/woo-ups-pickup/includes/ups/Service/SendA4LabelPdfToEmail.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/woo-ups-pickup/i18n/not-gettexted.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-ups-pickup/i18n/makepot.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Ups\\Service\\AbstractRestApiService' not found in wp-content/plugins/woo-ups-pickup/includes/ups/Service/ClosestPoints.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Ups\\Service\\AbstractRestApiService' not found in wp-content/plugins/woo-ups-pickup/includes/ups/Service/PrintService.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Ups\\Service\\AbstractRestApiService' not found in wp-content/plugins/woo-ups-pickup/includes/ups/Service/CreateWaybillService.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=change-pickup-point
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places,geometry&language=he&key=AIzaSyD62c5ORojhBdtNA1glgJfhQkd-y22IMns 244:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/admin.php?page=change-pickup-point
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places,geometry&language=he&key=AIzaSyD62c5ORojhBdtNA1glgJfhQkd-y22IMns 172:311 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Contributors: The plugin contributors field is missing
  • Donate link: Invalid URI found ("")
The official readme.txt might help

woo-ups-pickup/woocommerce-ups-pickups.php 77% from 13 tests

This is the main PHP file of "OPSI Israel Domestic Shipments" version 2.5.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-ups-pickup.php" instead of "woocommerce-ups-pickups.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 162 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "3.0.0")

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
No dangerous file extensions were detected8,553 lines of code in 72 files:
LanguageFilesBlank linesComment linesLines of code
PHP512,4202,3287,551
JavaScript1019624433
PO File4111135359
CSS3260175
LESS14032
SVG3003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity27.77
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes39
▷ Abstract classes25.13%
▷ Concrete classes3794.87%
▷ Final classes00.00%
Methods413
▷ Static methods81.94%
▷ Public methods34282.81%
▷ Protected methods245.81%
▷ Private methods4711.38%
Functions10
▷ Named functions660.00%
▷ Anonymous functions440.00%
Constants44
▷ Global constants36.82%
▷ Class constants4193.18%
▷ Public constants41100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.17MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/screenshot-3.png47.78KB47.90KB0.00%
includes/assets/screenshot-2.png48.36KB48.51KB0.00%
includes/assets/screenshot-1.png73.91KB74.35KB0.00%
includes/assets/logo_pickuppoint_small.png1.72KB2.12KB0.00%
includes/icons/CustomOrderStatus.png3.64KB0.50KB▼ 86.14%