83% australian-post-woocommerce-extension

Code Review | Australia Post WooCommerce Extension

WordPress plugin Australia Post WooCommerce Extension scored83%from 54 tests.

About plugin

  • Plugin page: australian-post-w...
  • Plugin version: 1.10.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2015
  • Latest release: Sep 28, 2023
  • Number of updates: 171
  • Update frequency: every 18.0 days
  • Top authors: waseem_senjer (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

4,000+ active /90,558 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.01MB] [CPU: ▼12.96ms] Passed 4 tests

Analyzing server-side resources used by Australia Post WooCommerce Extension
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0341.03 ▲0.18
Dashboard /wp-admin3.36 ▼0.0247.78 ▼14.75
Posts /wp-admin/edit.php3.41 ▲0.0249.14 ▼13.07
Add New Post /wp-admin/post-new.php5.94 ▲0.0283.95 ▼24.19
Media Library /wp-admin/upload.php3.28 ▲0.0239.27 ▲3.47

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: no files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Australia Post WooCommerce Extension
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.74 ▲0.302.10 ▲0.4944.11 ▲3.87
Dashboard /wp-admin2,209 ▲185.86 ▲0.9496.42 ▼9.2040.78 ▲3.35
Posts /wp-admin/edit.php2,086 ▼31.97 ▼0.0435.59 ▼1.7130.94 ▼8.58
Add New Post /wp-admin/post-new.php1,537 ▲423.04 ▼0.17683.99 ▲68.5750.24 ▲2.29
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.05110.99 ▲8.9047.23 ▲3.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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)
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
  • 61× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRubyAustraliaPost\\Deps\\Psr\\Log\\LoggerAwareInterface' not found in wp-content/plugins/australian-post-woocommerce-extension/deps/dvdoug/boxpacker/VolumePacker.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRubyAustraliaPost\\Deps\\DVDoug\\BoxPacker\\Box' not found in wp-content/plugins/australian-post-woocommerce-extension/deps/dvdoug/boxpacker/WorkingVolume.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/australian-post-woocommerce-extension/vendor/dvdoug/boxpacker/tests/BoxListTest.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRubyAustraliaPost\\Deps\\DVDoug\\BoxPacker\\Item' not found in wp-content/plugins/australian-post-woocommerce-extension/deps/dvdoug/boxpacker/ConstrainedPlacementItem.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRuby\\AustraliaPostLite\\DVDoug\\BoxPacker\\Item' not found in wp-content/plugins/australian-post-woocommerce-extension/vendor/dvdoug/boxpacker/src/ConstrainedPlacementItem.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRuby\\AustraliaPostLite\\DVDoug\\BoxPacker\\Item' not found in wp-content/plugins/australian-post-woocommerce-extension/vendor/dvdoug/boxpacker/tests/Test/TestItem.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'WPRuby\\AustraliaPostLite\\DVDoug\\BoxPacker\\Box' not found in wp-content/plugins/australian-post-woocommerce-extension/vendor/dvdoug/boxpacker/tests/Test/TestBox.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\ConfigCollectionInterface' not found in wp-content/plugins/australian-post-woocommerce-extension/vendor/typisttech/imposter/src/ConfigCollection.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPRuby\\AustraliaPostLite\\PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/australian-post-woocommerce-extension/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WPRubyAustraliaPost\\Deps\\PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/australian-post-woocommerce-extension/deps/psr/log/Test/LoggerInterfaceTest.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 86% 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
6 plugin tags: shipping method, woocommerce, admin, woocommerce extension, australia post...

australian-post-woocommerce-extension/australian-post.php 69% from 13 tests

"Australia Post WooCommerce Extension" version 1.10.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("australian-post-woocommerce-extension.php" instead of "australian-post.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("4.0.0" instead of "3.0")
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
No dangerous file extensions were detected7,961 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP1201,2824,5047,230
JSON100287
Cucumber2200148
reStructuredText788183136
YAML391102
Python1399240
XML13016
INI1002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity5.62
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces13
Interfaces18
Traits4
Classes90
▷ Abstract classes44.44%
▷ Concrete classes8695.56%
▷ Final classes00.00%
Methods643
▷ Static methods335.13%
▷ Public methods57389.11%
▷ Protected methods121.87%
▷ Private methods589.02%
Functions38
▷ Named functions12.63%
▷ Anonymous functions3797.37%
Constants19
▷ Global constants210.53%
▷ Class constants1789.47%
▷ Public constants1694.12%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected