84% ups-eu-woocommerce

Code Review | UPS Shipping and UPS Access Point™: Official Plugin

WordPress plugin UPS Shipping and UPS Access Point™: Official Plugin scored84%from 54 tests.

About plugin

  • Plugin page: ups-eu-woocommerce
  • Plugin version: 3.8.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-6.1.1
  • WordPress version: 6.3.1
  • First release: May 16, 2019
  • Latest release: Apr 11, 2023
  • Number of updates: 152
  • Update frequency: every 9.4 days
  • Top authors: officialups (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

700+ active /46,127 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
This plugin's installer ran successfully

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

An overview of server-side resources used by UPS Shipping and UPS Access Point™: Official Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.59 ▼13.65
Dashboard /wp-admin3.31 ▲0.0047.26 ▼4.53
Posts /wp-admin/edit.php3.36 ▲0.0049.01 ▲4.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.23 ▼12.16
Media Library /wp-admin/upload.php3.23 ▲0.0032.26 ▼5.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for UPS Shipping and UPS Access Point™: Official Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9914.43 ▲0.221.88 ▼0.7737.00 ▼18.51
Dashboard /wp-admin2,206 ▲155.83 ▼0.07104.18 ▼1.9143.96 ▲7.43
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0236.09 ▼3.3237.74 ▲5.24
Add New Post /wp-admin/post-new.php1,421 ▼11217.09 ▼6.06550.17 ▼110.5640.57 ▼13.33
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0494.85 ▼20.1640.74 ▼2.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 4095× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 41
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 41
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 41
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 42
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 41
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 42
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 41
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 41
    • > PHP Warning
      fgets() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 42
    • > PHP Warning
      feof() expects parameter 1 to be resource, bool given in wp-content/plugins/ups-eu-woocommerce/languages/BuildTranslates.php on line 41

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Contributors: The plugin contributors field is not present
The official readme.txt might help

ups-eu-woocommerce/ups-eu-woocommerce.php 92% from 13 tests

This is the main PHP file of "UPS Shipping and UPS Access Point™: Official Plugin" version 3.8.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin66,995 lines of code in 435 files:
LanguageFilesBlank linesComment linesLines of code
PHP3694,50321,17847,028
PO File83,7613,73510,311
Smarty435112278,877
SVG2271567
JSON300128
Markdown224070
JavaScript523112
CSS2191
INI1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity18.48
▷ Minimum class complexity1.00
▷ Maximum class complexity330.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces16
Interfaces4
Traits0
Classes328
▷ Abstract classes144.27%
▷ Concrete classes31495.73%
▷ Final classes00.00%
Methods1,950
▷ Static methods552.82%
▷ Public methods1,69787.03%
▷ Protected methods572.92%
▷ Private methods19610.05%
Functions92
▷ Named functions8086.96%
▷ Anonymous functions1213.04%
Constants170
▷ Global constants95.29%
▷ Class constants16194.71%
▷ Public constants161100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/css/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
assets/admin/css/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
assets/admin/images/removePackage.png0.26KB0.19KB▼ 26.62%
assets/admin/images/checked.png0.46KB0.35KB▼ 23.31%
assets/admin/images/address.png2.20KB1.50KB▼ 31.91%