10% wc-planzer-shipping

Code Review | Shipping via Planzer for WooCommerce

WordPress plugin Shipping via Planzer for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: wc-planzer-shipping
  • Plugin version: 1.0.15
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2021
  • Latest release: Aug 8, 2023
  • Number of updates: 43
  • Update frequency: every 14.1 days
  • Top authors: webwirkung (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,719 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-includes/functions.php+6691
    file_get_contents(wp-content/plugins/woocommerce/woocommerce.php): failed to open stream: No such file or directory

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

A check of server-side resources used by Shipping via Planzer for WooCommerce
This plugin has minimal impact on server resources
Page Memory (MB) CPU Time (ms)
Home / 3.46 ▲0.00 42.03 ▲0.70
Dashboard /wp-admin 3.31 ▲0.00 48.65 ▼3.88
Posts /wp-admin/edit.php 3.36 ▲0.00 46.37 ▼1.16
Add New Post /wp-admin/post-new.php 5.89 ▲0.00 85.19 ▼8.64
Media Library /wp-admin/upload.php 3.23 ▲0.00 34.45 ▼4.91

Server storage [IO: ▲97.81MB] [DB: ▲0.07MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • Total filesystem usage should be limited to 25MB (currently using 97.81MB)
Filesystem: 2,477 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Shipping via Planzer for WooCommerce
There were no issues detected in relation to browser resource usage
Page Nodes Memory (MB) Script (ms) Layout (ms)
Home / 2,789 ▲28 14.23 ▼0.13 1.73 ▲0.25 43.65 ▼0.65
Dashboard /wp-admin 2,198 ▲18 5.60 ▼0.02 82.40 ▼10.01 39.26 ▼6.69
Posts /wp-admin/edit.php 2,100 ▼3 1.94 ▼0.01 33.35 ▼6.42 35.35 ▼4.04
Add New Post /wp-admin/post-new.php 1,528 ▼0 23.52 ▲0.42 646.39 ▲3.27 55.99 ▲1.52
Media Library /wp-admin/upload.php 1,400 ▲9 4.39 ▲0.18 96.62 ▼4.13 42.83 ▼1.72

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wc-planzer-shipping/resources/views/note/delivery-note/footer.php
  • 724× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Filesystem\\Filesystem' not found in wp-content/plugins/wc-planzer-shipping/vendor/illuminate/contracts/Filesystem/Cloud.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'TCPDF' not found in wp-content/plugins/wc-planzer-shipping/vendor/setasign/fpdi/src/Tcpdf/Fpdi.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\Facades\\Facade' not found in wp-content/plugins/wc-planzer-shipping/vendor/illuminate/support/Facades/Storage.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-planzer-shipping/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface' not found in wp-content/plugins/wc-planzer-shipping/vendor/symfony/translation/Formatter/MessageFormatter.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Planzer\\Settings\\Sections\\SectionBase' not found in wp-content/plugins/wc-planzer-shipping/src/Settings/Sections/FTP.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-planzer-shipping/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/wc-planzer-shipping/vendor/mpdf/mpdf/src/Tag/TextCircle.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wc-planzer-shipping/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php:4
    • > PHP Fatal error
      Trait 'Carbon\\Traits\\IntervalRounding' not found in wp-content/plugins/wc-planzer-shipping/vendor/nesbot/carbon/src/Carbon/Traits/Rounding.php on line 27

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

readme.txt 81% from 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
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
  • Screenshots: A description for screenshot #7 is required in wc-planzer-shipping/assets to your readme.txt
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

wc-planzer-shipping/wc-planzer-shipping.php 92% from 13 tests

The principal PHP file in "Shipping via Planzer for WooCommerce" v. 1.0.15 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wc-planzer-shipping/vendor/nesbot/carbon/bin/carbon.bat
164,213 lines of code in 2,026 files:
Language Files Blank lines Comment lines Lines of code
PHP 1,942 27,702 68,366 154,978
XSD 3 92 48 2,803
JSON 24 0 0 2,752
Markdown 29 689 0 2,022
PO File 2 307 391 702
CSS 3 65 18 406
YAML 12 94 7 359
XML 3 10 0 75
reStructuredText 1 74 78 75
SVG 1 0 0 19
Bourne Shell 2 5 11 15
DOS Batch 1 0 0 4
JavaScript 3 0 0 3

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 7,021)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code 0.46
Average class complexity 22.26
▷ Minimum class complexity 1.00
▷ Maximum class complexity 7,021.00
Average method complexity 6.22
▷ Minimum method complexity 1.00
▷ Maximum method complexity 460.00
Code structure
Namespaces 183
Interfaces 145
Traits 46
Classes 1,019
▷ Abstract classes 240 23.55%
▷ Concrete classes 779 76.45%
▷ Final classes 76 9.76%
Methods 5,832
▷ Static methods 1,153 19.77%
▷ Public methods 4,743 81.33%
▷ Protected methods 572 9.81%
▷ Private methods 517 8.86%
Functions 470
▷ Named functions 106 22.55%
▷ Anonymous functions 364 77.45%
Constants 879
▷ Global constants 18 2.05%
▷ Class constants 861 97.95%
▷ Public constants 851 98.84%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin