83% cargo-tracking-for-woocommerce

Code Review | Cargo Tracking for WooCommerce

WordPress plugin Cargo Tracking for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: cargo-tracking-fo...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1
  • WordPress version: 6.3.1
  • First release: Jun 2, 2022
  • Latest release: Nov 9, 2022
  • Number of updates: 10
  • Update frequency: every 16.0 days
  • Top authors: ilhanaydinli (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active /2,591 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼12.59ms] Passed 4 tests

Server-side resources used by Cargo Tracking for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.21 ▼8.35
Dashboard /wp-admin3.36 ▲0.0244.88 ▼15.17
Posts /wp-admin/edit.php3.48 ▲0.1250.37 ▼0.18
Add New Post /wp-admin/post-new.php5.94 ▲0.0578.98 ▼22.21
Media Library /wp-admin/upload.php3.29 ▲0.0532.86 ▼4.61

Server storage [IO: ▲0.67MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cargo Tracking for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.23 ▼1.161.71 ▼0.7539.23 ▼7.79
Dashboard /wp-admin2,206 ▲204.85 ▼0.09107.61 ▲2.1139.15 ▼4.86
Posts /wp-admin/edit.php2,089 ▼32.18 ▲0.1840.25 ▼1.7733.95 ▼3.70
Add New Post /wp-admin/post-new.php1,542 ▼018.37 ▲0.29604.10 ▼8.1958.98 ▲13.51
Media Library /wp-admin/upload.php1,385 ▼34.24 ▲0.0497.95 ▼2.7939.76 ▼2.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/cargo-tracking-for-woocommerce/app/Table/Table.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/cargo-tracking-for-woocommerce/app/Woocommerce/WCSettings.php:7

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: woocommerce cargo tracking, cargo, cargo tracking, woocommerce kargo takip, shipping...

cargo-tracking-for-woocommerce/CargoTrackingForWooCommerce.php 77% from 13 tests

The principal PHP file in "Cargo Tracking for WooCommerce" v. 1.0.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 188 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("cargo-tracking-for-woocommerce.php" instead of "CargoTrackingForWooCommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,913 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP263044331,626
PO File15867136
CSS110070
JavaScript13045
Markdown121031
JSON1005

PHP code Passed 2 tests

A short 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.41
Average class complexity9.60
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods94
▷ Static methods2223.40%
▷ Public methods9095.74%
▷ Protected methods00.00%
▷ Private methods44.26%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.53MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ptt.png12.76KB13.34KB0.00%
assets/img/ups.png3.84KB4.08KB0.00%
assets/img/surat.png81.96KB86.62KB0.00%
screenshots/screenshot-3.png61.30KB24.88KB▼ 59.41%
screenshots/screenshot-5.png20.77KB7.95KB▼ 61.73%