84% woo-shipping-gateway

Code Review | Frenet Shipping Gateway for WooCommerce - Correios, Etiquetas e Rastreio

WordPress plugin Frenet Shipping Gateway for WooCommerce - Correios, Etiquetas e Rastreio scored84%from 54 tests.

About plugin

  • Plugin page: woo-shipping-gateway
  • Plugin version: 2.1.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2.1
  • WordPress version: 6.3.1
  • First release: Jan 13, 2016
  • Latest release: Nov 8, 2023
  • Number of updates: 60
  • Update frequency: every 47.6 days
  • Top authors: frenet (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

6,000+ active /50,766 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.01MB] [CPU: ▼5.25ms] Passed 4 tests

This is a short check of server-side resources used by Frenet Shipping Gateway for WooCommerce - Correios, Etiquetas e Rastreio
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0236.09 ▼3.84
Dashboard /wp-admin3.33 ▼0.0245.54 ▼12.93
Posts /wp-admin/edit.php3.38 ▲0.0246.83 ▼2.03
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.05 ▼2.19
Media Library /wp-admin/upload.php3.25 ▲0.0235.20 ▲1.24

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Frenet Shipping Gateway for WooCommerce - Correios, Etiquetas e Rastreio
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3214.70 ▲0.511.64 ▼0.3339.97 ▼2.99
Dashboard /wp-admin2,212 ▲325.63 ▲0.0194.04 ▲5.7737.30 ▼2.86
Posts /wp-admin/edit.php2,115 ▲182.02 ▲0.0642.31 ▲2.9036.53 ▼2.30
Add New Post /wp-admin/post-new.php1,537 ▲1123.27 ▼0.10665.16 ▼8.2851.54 ▼10.75
Media Library /wp-admin/upload.php1,411 ▲144.18 ▼0.01100.19 ▲0.8343.99 ▲1.74

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woo-shipping-gateway/woo-shipping-gateway.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Frenet' not found in wp-content/plugins/woo-shipping-gateway/includes/class-wc-frenet-shipping-simulator.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/woo-shipping-gateway/includes/class-wc-frenet.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
8 plugin tags: shipping, tnt, correios, jadlog, jamef...

woo-shipping-gateway/woo-shipping-gateway.php 85% from 13 tests

Analyzing the main PHP file in "Frenet Shipping Gateway for WooCommerce - Correios, Etiquetas e Rastreio" version 2.1.15
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages/")

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
Good job! No executable or dangerous file extensions detected945 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5183241735
PO File138295
JavaScript1302185
CSS15028
Markdown1102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.50
▷ Minimum class complexity2.00
▷ Maximum class complexity77.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods36
▷ Static methods822.22%
▷ Public methods2363.89%
▷ Protected methods1027.78%
▷ Private methods38.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin