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
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.03 ▲0.70
Dashboard /wp-admin3.31 ▲0.0048.65 ▼3.88
Posts /wp-admin/edit.php3.36 ▲0.0046.37 ▼1.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.19 ▼8.64
Media Library /wp-admin/upload.php3.23 ▲0.0034.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
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.131.73 ▲0.2543.65 ▼0.65
Dashboard /wp-admin2,198 ▲185.60 ▼0.0282.40 ▼10.0139.26 ▼6.69
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0133.35 ▼6.4235.35 ▼4.04
Add New Post /wp-admin/post-new.php1,528 ▼023.52 ▲0.42646.39 ▲3.2755.99 ▲1.52
Media Library /wp-admin/upload.php1,400 ▲94.39 ▲0.1896.62 ▼4.1342.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:
LanguageFilesBlank linesComment linesLines of code
PHP1,94227,70268,366154,978
XSD392482,803
JSON24002,752
Markdown2968902,022
PO File2307391702
CSS36518406
YAML12947359
XML310075
reStructuredText1747875
SVG10019
Bourne Shell251115
DOS Batch1004
JavaScript3003

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 code0.46
Average class complexity22.26
▷ Minimum class complexity1.00
▷ Maximum class complexity7,021.00
Average method complexity6.22
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces183
Interfaces145
Traits46
Classes1,019
▷ Abstract classes24023.55%
▷ Concrete classes77976.45%
▷ Final classes769.76%
Methods5,832
▷ Static methods1,15319.77%
▷ Public methods4,74381.33%
▷ Protected methods5729.81%
▷ Private methods5178.86%
Functions470
▷ Named functions10622.55%
▷ Anonymous functions36477.45%
Constants879
▷ Global constants182.05%
▷ Class constants86197.95%
▷ Public constants85198.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