84% tracking-number-for-woocommerce

Code Review | Tracking Number for WooCommerce

WordPress plugin Tracking Number for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: tracking-number-f...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Oct 7, 2022
  • Latest release: Oct 7, 2022
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: kosvrouvas (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 144 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.29ms] Passed 4 tests

Server-side resources used by Tracking Number for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.26 ▲1.26
Dashboard /wp-admin3.32 ▲0.0144.16 ▼9.85
Posts /wp-admin/edit.php3.37 ▲0.0149.40 ▼2.25
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.97 ▼14.62
Media Library /wp-admin/upload.php3.24 ▲0.0134.48 ▼2.43

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Tracking Number for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼2514.74 ▲0.001.74 ▼0.1840.23 ▼5.31
Dashboard /wp-admin2,203 ▼35.83 ▼0.06103.23 ▼21.4938.66 ▼10.06
Posts /wp-admin/edit.php2,092 ▼02.04 ▼0.0144.08 ▲4.4242.17 ▲6.99
Add New Post /wp-admin/post-new.php1,535 ▲223.13 ▼0.09664.55 ▲52.5456.49 ▼3.38
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.0099.95 ▼10.5047.01 ▼1.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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)
Good news, no errors were detected

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tracking-number-for-woocommerce/admin/order-tracking-number-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tracking-number-for-woocommerce/order-tracking-number.php:15

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

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: woocommerce, tracking, order

tracking-number-for-woocommerce/order-tracking-number.php 85% from 13 tests

This is the main PHP file of "Tracking Number for WooCommerce" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • 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: The principal plugin file should be the same as the plugin slug ("tracking-number-for-woocommerce.php" instead of "order-tracking-number.php")

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 detected139 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22736103
PO File1101136

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin