Benchmarks
Plugin footprint 58% 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
- This plugin did not install gracefully
- > Error in wp-content/plugins/automated-postnord-shipping/hitshipo_pn_basic.php+36
Uncaught Error: Call to undefined function WC() in wp-content/plugins/automated-postnord-shipping/hitshipo_pn_basic.php:36
Stack trace:
#0 wp-includes/class-wp-hook.php(312): hitshipo_woo_pn_plugin_activation()
#1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(517): WP_Hook->do_action()
#3 wp-admin/includes/plugin.php(720): do_action()
Server metrics [RAM: ▲0.34MB] [CPU: ▼6.39ms] Passed 4 tests
Analyzing server-side resources used by Automated PostNord label and pickup
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.82 ▲0.35 | 38.72 ▼3.06 |
Dashboard /wp-admin | 3.66 ▲0.31 | 46.33 ▼22.54 |
Posts /wp-admin/edit.php | 3.77 ▲0.41 | 51.15 ▲7.41 |
Add New Post /wp-admin/post-new.php | 6.24 ▲0.35 | 88.59 ▼4.03 |
Media Library /wp-admin/upload.php | 3.58 ▲0.35 | 38.60 ▲4.09 |
Server storage [IO: ▲8.43MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,339 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Automated PostNord label and pickup
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.55 ▲0.20 | 1.61 ▼0.11 | 37.64 ▼9.90 |
Dashboard /wp-admin | 2,195 ▲21 | 5.61 ▲0.04 | 90.37 ▼11.18 | 36.63 ▼5.72 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.02 ▲0.06 | 39.35 ▲2.04 | 37.02 ▲3.05 |
Add New Post /wp-admin/post-new.php | 1,526 ▼5 | 23.59 ▲0.53 | 687.42 ▲42.12 | 55.45 ▲1.16 |
Media Library /wp-admin/upload.php | 1,403 ▼0 | 4.18 ▲0.01 | 94.21 ▼3.66 | 41.39 ▼2.53 |
Uninstaller [IO: ▲0.00MB] [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
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- widget_theysaidso_widget
- 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)
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 693× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php:25
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/google/common-protos/src/Api/Expr/V1beta1/MapValue/Entry.php:16
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/monolog/monolog/src/Monolog/Handler/ProcessHandler.php:27
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/google/common-protos/src/Api/Expr/V1alpha1/Expr.php:27
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/google/common-protos/src/Rpc/RequestInfo.php:17
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php:26
- > PHP Fatal error
Uncaught Error: Interface 'Grpc\\CallInvoker' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/grpc/grpc/src/lib/DefaultCallInvoker.php:25
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/google/common-protos/src/Rpc/Status.php:21
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/google/common-protos/src/Api/Servicecontrol/V1/Operation.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% 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
These attributes need your attention:
- Screenshots: Screenshot #6 (Order page where you can easily get labels.) image missing
automated-postnord-shipping/hitshipo_pn_basic.php 77% from 13 tests
The main PHP file in "Automated PostNord label and pickup" ver. 1.1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("automated-postnord-shipping.php" instead of "hitshipo_pn_basic.php")
- Requires at least: Required version must match the one declared in readme.txt ("4.0.1" instead of "2.6")
- Text Domain: The text domain name should consist of only dashes and lowercase characters
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Almost there! Just fix the following issues
- Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/automated-postnord-shipping/controllors/classes/gtrans/vendor/bin/google-cloud-batch.bat
- .bat - Batch File in Windows
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1,188 | 16,229 | 71,380 | 73,410 |
Markdown | 42 | 1,668 | 0 | 5,164 |
JSON | 36 | 4 | 0 | 3,250 |
XSLT | 2 | 23 | 20 | 209 |
Bourne Shell | 9 | 46 | 81 | 172 |
YAML | 4 | 10 | 0 | 98 |
XML | 5 | 1 | 5 | 92 |
Protocol Buffers | 2 | 14 | 38 | 62 |
Python | 1 | 17 | 43 | 46 |
make | 1 | 4 | 0 | 9 |
DOS Batch | 1 | 0 | 0 | 4 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
- Method cyclomatic complexity should be reduced to less than 100 (currently 167)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 5.73 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 502.00 |
Average method complexity | 1.84 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 167.00 |
Code structure | ||
---|---|---|
Namespaces | 165 | |
Interfaces | 52 | |
Traits | 58 | |
Classes | 1,051 | |
▷ Abstract classes | 18 | 1.71% |
▷ Concrete classes | 1,033 | 98.29% |
▷ Final classes | 15 | 1.45% |
Methods | 6,441 | |
▷ Static methods | 562 | 8.73% |
▷ Public methods | 5,710 | 88.65% |
▷ Protected methods | 235 | 3.65% |
▷ Private methods | 496 | 7.70% |
Functions | 292 | |
▷ Named functions | 78 | 26.71% |
▷ Anonymous functions | 214 | 73.29% |
Constants | 584 | |
▷ Global constants | 3 | 0.51% |
▷ Class constants | 581 | 99.49% |
▷ Public constants | 561 | 96.56% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.22MB with 0.13MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
controllors/views/hpn.png | 7.83KB | 3.84KB | ▼ 51.01% |
controllors/views/pn.png | 101.22KB | 38.30KB | ▼ 62.16% |
pn.png | 119.73KB | 45.66KB | ▼ 61.87% |