78% entregar-shipping-method

Code Review | Entregar for WooCommerce

WordPress plugin Entregar for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: entregar-shipping...
  • Plugin version: 1.2.01
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: Dec 28, 2020
  • Latest release: May 21, 2021
  • Number of updates: 45
  • Update frequency: every 3.3 days
  • Top authors: webstower (100%)entregarweb (4.44%)

Code review

54 tests

User reviews

1 review

Install metrics

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

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

An overview of server-side resources used by Entregar for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.97 ▲1.32
Dashboard /wp-admin3.31 ▲0.0046.42 ▼3.27
Posts /wp-admin/edit.php3.36 ▲0.0049.10 ▲2.58
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.76 ▼0.95
Media Library /wp-admin/upload.php3.23 ▲0.0036.40 ▼2.38
Ayuda /wp-admin/admin.php?page=entregar-help3.0025.08
Mapeo /wp-admin/admin.php?page=entregar-mapping3.0021.95
Ajustes /wp-admin/admin.php?page=entregar-settings3.0024.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Entregar for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.461.65 ▼0.2443.36 ▼3.56
Dashboard /wp-admin2,203 ▲185.80 ▲0.7095.45 ▼10.6739.82 ▼4.01
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0040.26 ▲1.3335.65 ▼0.19
Add New Post /wp-admin/post-new.php1,533 ▼123.17 ▲0.07626.36 ▼52.2058.42 ▲3.37
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.0095.79 ▼8.0742.89 ▼2.47
Ayuda /wp-admin/admin.php?page=entregar-help280.440.074.06
Mapeo /wp-admin/admin.php?page=entregar-mapping280.440.093.62
Ajustes /wp-admin/admin.php?page=entregar-settings280.440.063.85

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Plugin\\Entregar\\Settings\\Fields\\FieldInterface' not found in wp-content/plugins/entregar-shipping-method/Settings/Fields/Field.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin\\Entregar\\Settings\\Sections\\Section' not found in wp-content/plugins/entregar-shipping-method/Settings/Mapping/SendingStatusSection.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin\\Entregar\\Settings\\Fields\\Field' not found in wp-content/plugins/entregar-shipping-method/Settings/Fields/DescriptionField.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin\\Entregar\\Api\\ApiConnector' not found in wp-content/plugins/entregar-shipping-method/Api/EntregarApi.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin\\Entregar\\Settings\\Fields\\Field' not found in wp-content/plugins/entregar-shipping-method/Settings/Fields/SelectField.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin\\Entregar\\Settings\\Sections\\Section' not found in wp-content/plugins/entregar-shipping-method/Settings/GeneralSettings/IntegrationSection.php:11
    • > PHP Fatal error
      Trait 'Plugin\\Entregar\\Helper\oticesTrait' not found in wp-content/plugins/entregar-shipping-method/Helper/Helper.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin\\Entregar\\Settings\\Fields\\Field' not found in wp-content/plugins/entregar-shipping-method/Settings/Fields/TextField.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin\\Entregar\\Settings\\Sections\\Section' not found in wp-content/plugins/entregar-shipping-method/Settings/GeneralSettings/SellerSection.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Plugin\\Entregar\\Settings\\Fields\\Field' not found in wp-content/plugins/entregar-shipping-method/Settings/Fields/NumberField.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=entregar-help
    • > Network (severe)
    wp-admin/admin.php?page=entregar-help - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=entregar-mapping
    • > Network (severe)
    wp-admin/admin.php?page=entregar-mapping - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=entregar-settings
    • > Network (severe)
    wp-admin/admin.php?page=entregar-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: shipments, entregar

entregar-shipping-method/entregar.php 77% from 13 tests

"Entregar for WooCommerce" version 1.2.01's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("entregar-shipping-method.php" instead of "entregar.php")
  • Requires at least: The required version number must match the one declared in readme.txt ("4.8" instead of "4.9")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,802 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP409938642,362
PO File17681190
JavaScript32027149
Sass18061
Markdown17033
SVG1006
CSS1001

PHP code Passed 2 tests

This is a short overview 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.29
Average class complexity6.15
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces12
Interfaces3
Traits7
Classes30
▷ Abstract classes13.33%
▷ Concrete classes2996.67%
▷ Final classes413.79%
Methods153
▷ Static methods8454.90%
▷ Public methods13386.93%
▷ Protected methods21.31%
▷ Private methods1811.76%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants7
▷ Global constants00.00%
▷ Class constants7100.00%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo_black.png5.05KB3.15KB▼ 37.54%
assets/img/logo.png6.20KB3.20KB▼ 48.31%
assets/img/icono-menu.png0.61KB0.72KB0.00%