73% easy-woocommerce-tracking-code-free

Code Review | Easy WooCommerce Tracking Code Free

WordPress plugin Easy WooCommerce Tracking Code Free scored73%from 54 tests.

About plugin

  • Plugin page: easy-woocommerce-...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2020
  • Latest release: Dec 15, 2021
  • Number of updates: 6
  • Update frequency: every 103.8 days
  • Top authors: webrook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /888 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.03MB] [CPU: ▼4.33ms] Passed 4 tests

An overview of server-side resources used by Easy WooCommerce Tracking Code Free
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.99 ▲3.88
Dashboard /wp-admin3.33 ▲0.0350.79 ▼3.44
Posts /wp-admin/edit.php3.39 ▲0.0349.09 ▼2.61
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.45 ▼12.26
Media Library /wp-admin/upload.php3.26 ▲0.0338.92 ▲0.98
Contenuto email /wp-admin/admin.php?page=easy-woocommerce-tracking-code-email3.2230.85
Invio email /wp-admin/admin.php?page=easy-woocommerce-tracking-code-send3.2232.79
Impostazioni /wp-admin/admin.php?page=easy-woocommerce-tracking-code-settings3.2262.67
Gestione corrieri /wp-admin/admin.php?page=easy-woocommerce-tracking-code-couriers3.2234.39

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

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

Browser metrics Passed 4 tests

Easy WooCommerce Tracking Code Free: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲15113.96 ▼0.338.61 ▲5.9143.50 ▲0.68
Dashboard /wp-admin2,260 ▲545.91 ▲1.04111.42 ▲6.1044.25 ▲1.52
Posts /wp-admin/edit.php2,139 ▲392.05 ▲0.0233.96 ▼2.4033.45 ▼5.99
Add New Post /wp-admin/post-new.php1,559 ▲1923.07 ▲4.86652.48 ▼22.9656.05 ▲3.71
Media Library /wp-admin/upload.php1,442 ▲424.20 ▲0.0797.42 ▼22.1343.58 ▼6.48
Contenuto email /wp-admin/admin.php?page=easy-woocommerce-tracking-code-email8242.0727.3431.62
Invio email /wp-admin/admin.php?page=easy-woocommerce-tracking-code-send8302.0724.8025.23
Impostazioni /wp-admin/admin.php?page=easy-woocommerce-tracking-code-settings8272.0424.5329.20
Gestione corrieri /wp-admin/admin.php?page=easy-woocommerce-tracking-code-couriers8272.0428.5031.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=easy-woocommerce-tracking-code-couriers
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 0% 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-woocommerce-tracking-code-free/public/partials/easy-woocommerce-tracking-code-free-public-display.php
    • > /wp-content/plugins/easy-woocommerce-tracking-code-free/admin/partials/easy-woocommerce-tracking-code-free-admin-display.php
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require(vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/easy-woocommerce-tracking-code-free/templates/lib/phpmailer/get_oauth_token.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-tracking-code-free/templates/email-send-settings.php:150
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-tracking-code-free/templates/general-settings.php:125
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-woocommerce-tracking-code-free/metaboxes/order-columns.php:6
    • > PHP Fatal error
      require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/easy-woocommerce-tracking-code-free/templates/lib/phpmailer/get_oauth_token.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-tracking-code-free/templates/couriers-settings.php:86
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-tracking-code-free/metaboxes/order-meta-box.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-woocommerce-tracking-code-free/templates/email-text-settings.php:154
    • > PHP Fatal error
      Uncaught Error: Class 'PHPMailer' not found in wp-content/plugins/easy-woocommerce-tracking-code-free/templates/lib/phpmailer/class.phpmaileroauth.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
6 plugin tags: woocommerce, spedizione, spedizioni, tracking, corrieri...

easy-woocommerce-tracking-code-free/easy-woocommerce-tracking-code-free.php Passed 13 tests

The principal PHP file in "Easy WooCommerce Tracking Code Free" v. 1.0.3 is loaded by WordPress automatically on each request
131 characters long description:
Con Easy WooCommerce Tracking Code Free è possibile inserire all'interno di un ordinativo WooCommerce, il numero di tracking code.

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
Success! There were no dangerous files found in this plugin4,658 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP266002,9844,590
JavaScript295451
CSS23817

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity42.07
▷ Minimum class complexity1.00
▷ Maximum class complexity425.00
Average method complexity3.99
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods192
▷ Static methods126.25%
▷ Public methods14676.04%
▷ Protected methods3719.27%
▷ Private methods94.69%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants936.00%
▷ Class constants1664.00%
▷ Public constants16100.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
PNG images were not found in this plugin