84% tracking-la-poste-for-woocommerce

Code Review | Tracking La Poste for WooCommerce

WordPress plugin Tracking La Poste for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: tracking-la-poste...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0+
  • WordPress version: 6.3.1
  • First release: Nov 24, 2016
  • Latest release: Dec 1, 2016
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: corsonr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /0 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.16MB] [CPU: ▼2.49ms] Passed 4 tests

An overview of server-side resources used by Tracking La Poste for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.2246.72 ▲3.17
Dashboard /wp-admin3.78 ▲0.2164.87 ▲9.90
Posts /wp-admin/edit.php3.83 ▲0.1548.87 ▼6.41
Add New Post /wp-admin/post-new.php6.30 ▲0.15100.96 ▼10.06
Media Library /wp-admin/upload.php3.64 ▲0.1539.34 ▲3.36

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tracking La Poste for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.38 ▲0.241.71 ▼0.3440.38 ▼2.30
Dashboard /wp-admin2,194 ▲145.65 ▲0.0287.30 ▼4.9338.49 ▼7.61
Posts /wp-admin/edit.php2,102 ▲22.04 ▲0.0135.72 ▼1.5534.54 ▼1.08
Add New Post /wp-admin/post-new.php1,542 ▲1123.24 ▲0.00636.51 ▲3.0350.73 ▲0.25
Media Library /wp-admin/upload.php1,399 ▼14.25 ▲0.0796.93 ▼14.0739.34 ▼4.86

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/tracking-la-poste-for-woocommerce/includes/class-wc-la-poste-tracking-integration.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/tracking-la-poste-for-woocommerce/tracking-la-poste-for-woocommerce.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

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
5 plugin tags: colissimo, woocommerce, la poste, e-commerce, chronopost

tracking-la-poste-for-woocommerce/tracking-la-poste-for-woocommerce.php Passed 13 tests

"Tracking La Poste for WooCommerce" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
67 characters long description:
Add tracking number to order package and update status dynamically.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin848 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12237410704
PO File1264271
JavaScript219469
Markdown1303
CSS1001

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.28
Average class complexity9.57
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods46
▷ Static methods12.17%
▷ Public methods4597.83%
▷ Protected methods00.00%
▷ Private methods12.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin