83% shipping-servientrega-woocommerce

Code Review | Shipping Servientrega Woocommerce

WordPress plugin Shipping Servientrega Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: shipping-servient...
  • Plugin version: 6.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 28, 2019
  • Latest release: Sep 20, 2023
  • Number of updates: 144
  • Update frequency: every 11.0 days
  • Top authors: saulmorales (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /17,536 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.33ms] Passed 4 tests

An overview of server-side resources used by Shipping Servientrega Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.05 ▼2.49
Dashboard /wp-admin3.34 ▼0.0148.93 ▼19.49
Posts /wp-admin/edit.php3.39 ▲0.0351.96 ▲1.76
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.66 ▼5.08
Media Library /wp-admin/upload.php3.26 ▲0.0337.71 ▲2.84

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shipping Servientrega Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.27 ▼0.141.67 ▼0.0443.55 ▼2.71
Dashboard /wp-admin2,198 ▲185.61 ▲0.0182.71 ▼17.9740.18 ▼4.72
Posts /wp-admin/edit.php2,107 ▲42.15 ▲0.1735.25 ▼0.7939.04 ▼0.08
Add New Post /wp-admin/post-new.php1,532 ▲123.29 ▲0.28669.77 ▼12.0259.93 ▲10.69
Media Library /wp-admin/upload.php1,406 ▲34.23 ▼0.01100.81 ▼1.2144.03 ▼0.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 108× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/lib/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/vendor/saulmoralespa/servientrega-webservice-php/src/SoapClientNG.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/vendor/guzzlehttp/promises/src/CancellationException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\MessageFormatterInterface' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/vendor/guzzlehttp/guzzle/src/MessageFormatter.php:38
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/vendor/guzzlehttp/psr7/src/Stream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/lib/vendor/guzzlehttp/promises/src/TaskQueue.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/shipping-servientrega-woocommerce/lib/lib/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/shipping-servientrega-woocommerce/includes/class-method-shipping-servientrega-wc.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

shipping-servientrega-woocommerce/shipping-servientrega-wc.php 77% from 13 tests

"Shipping Servientrega Woocommerce" version 6.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shipping-servientrega-woocommerce.php" instead of "shipping-servientrega-wc.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("6.0" instead of "4.0")
  • Git Repository: Please remove the Git repository from this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin22,092 lines of code in 197 files:
LanguageFilesBlank linesComment linesLines of code
PHP1532,6076,42416,949
Markdown211,28003,806
JSON15001,153
XML400130
JavaScript23038
make1409
YAML1007

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.78
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces15
Interfaces56
Traits6
Classes169
▷ Abstract classes00.00%
▷ Concrete classes169100.00%
▷ Final classes7142.01%
Methods1,667
▷ Static methods33420.04%
▷ Public methods1,42185.24%
▷ Protected methods110.66%
▷ Private methods23514.10%
Functions347
▷ Named functions15644.96%
▷ Anonymous functions19155.04%
Constants138
▷ Global constants53.62%
▷ Class constants13396.38%
▷ Public constants11183.46%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/servientrega.png12.23KB4.46KB▼ 63.51%