83% transdirect-shipping

Code Review | Transdirect Shipping Plugin for Woocommerce

WordPress plugin Transdirect Shipping Plugin for Woocommerce scored 83% from 54 tests.

About plugin

  • Plugin page: transdirect-shipping
  • Plugin version: 7.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.9.2
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Mar 15, 2022
  • Number of updates: 150
  • Update frequency: every 18.0 days
  • Top authors: transdirect (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

400+ active / 17,920 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Transdirect Shipping Plugin for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.24 ▼2.28
Dashboard /wp-admin3.31 ▲0.0054.90 ▼15.08
Posts /wp-admin/edit.php3.36 ▲0.0065.74 ▲6.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.27 ▲0.75
Media Library /wp-admin/upload.php3.23 ▲0.0037.73 ▼2.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Transdirect Shipping Plugin for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3613.56 ▼1.224.72 ▲2.9041.79 ▼3.47
Dashboard /wp-admin2,206 ▲34.86 ▼1.03108.62 ▼3.4741.25 ▼6.04
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0140.08 ▲0.5637.57 ▲1.78
Add New Post /wp-admin/post-new.php1,544 ▲17118.34 ▲0.52592.22 ▼79.1155.84 ▲1.11
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.0498.94 ▼7.4940.20 ▼6.99

Uninstaller [IO: ✅] [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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/transdirect-shipping/templates/part_htm.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/transdirect-shipping/part_htm.php:201

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #3, #4, #5 in transdirect-shipping/assets to your readme.txt
  • Tags: You are using too many tags: 25 tag instead of maximum 10
You can look at the official readme.txt

transdirect-shipping/transdirect_shipping.php 77% from 13 tests

The entry point to "Transdirect Shipping Plugin for Woocommerce" version 7.7.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Domain Path: The domain path folder was not found ("/lang")
  • Main file name: Name the main plugin file the same as the plugin slug ("transdirect-shipping.php" instead of "transdirect_shipping.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin7,497 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP125075893,600
JavaScript4613802,935
CSS3139958
Markdown1304

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity31.20
▷ Minimum class complexity12.00
▷ Maximum class complexity54.00
Average method complexity5.76
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2388.46%
▷ Protected methods00.00%
▷ Private methods311.54%
Functions40
▷ Named functions3997.50%
▷ Anonymous functions12.50%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/countryflags.png74.75KB25.52KB▼ 65.86%
countryflags.png74.75KB25.52KB▼ 65.86%
assets/images/logo-transdirect.png11.86KB5.75KB▼ 51.54%
logo-transdirect.png11.86KB5.75KB▼ 51.54%