Benchmarks
Plugin footprint 75% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
- The plugin cannot be installed
- > Error in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/hit_m_dhlexpress_basic.php+32
Uncaught Error: Call to undefined function WC() in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/hit_m_dhlexpress_basic.php:32
Stack trace:
#0 wp-includes/class-wp-hook.php(309): hit_m_woo_dhl_express_plugin_activation()
#1 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
#2 wp-includes/plugin.php(474): WP_Hook->do_action()
#3 wp-admin/includes/plugin.php(716): do_action()
Server metrics [RAM: ▼0.02MB] [CPU: ▼302.56ms] Passed 4 tests
A check of server-side resources used by DHL Express live shipping rates and labels
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.07 | 56.70 ▲5.98 |
Dashboard /wp-admin | 3.41 ▲0.01 | 37.06 ▲0.03 |
Posts /wp-admin/edit.php | 3.65 ▲0.01 | 35.76 ▼0.78 |
Add New Post /wp-admin/post-new.php | 6.89 ▼0.08 | 95.27 ▼1,207.12 |
Media Library /wp-admin/upload.php | 3.30 ▼0.00 | 25.60 ▼2.36 |
Server storage [IO: ▲8.29MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 1,341 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for DHL Express live shipping rates and labels
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,785 ▲63 | 15.92 ▼0.03 | 6.06 ▲0.26 | 2.11 ▼0.18 |
Dashboard /wp-admin | 2,892 ▲31 | 6.09 ▼0.07 | 122.70 ▼7.59 | 157.34 ▼5.59 |
Posts /wp-admin/edit.php | 2,694 ▼0 | 3.22 ▼0.02 | 63.05 ▼1.39 | 140.68 ▲1.48 |
Add New Post /wp-admin/post-new.php | 1,635 ▼127 | 17.29 ▼1.87 | 463.69 ▲77.28 | 152.52 ▼3.77 |
Media Library /wp-admin/upload.php | 1,698 ▼0 | 5.52 ▲0.01 | 143.48 ▲0.30 | 190.92 ▲4.70 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 693× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php:29
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/google/common-protos/src/Api/Servicecontrol/V1/ReportResponse.php:16
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/google/gax/tests/Tests/Unit/ServerStreamTest.php:42
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:11
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
- > PHP Fatal error
Uncaught Error: Interface 'Google\\Cloud\\Translate\\V2\\Connection\\ConnectionInterface' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/google/cloud-translate/src/V2/Connection/Rest.php:30
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/google/common-protos/src/Api/Servicecontrol/V1/Distribution/ExplicitBuckets.php:16
- > PHP Fatal error
Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php:30
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/google/common-protos/src/Rpc/PreconditionFailure.php:19
- > PHP Fatal error
Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/controllors/classes/gtrans/vendor/google/common-protos/src/Rpc/BadRequest.php:17
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
- Screenshots: A description for screenshot #6 is missing in hit-dhl-real-time-rates-and-shipping-label-xml-based/assets to your readme.txt
hit-dhl-real-time-rates-and-shipping-label-xml-based/hit_m_dhlexpress_basic.php 77% from 13 tests
The principal PHP file in "DHL Express live shipping rates and labels" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
- Requires at least: The required version number must match the one declared in readme.txt ("4.0.1" instead of "2.6")
- Main file name: Name the main plugin file the same as the plugin slug ("hit-dhl-real-time-rates-and-shipping-label-xml-based.php" instead of "hit_m_dhlexpress_basic.php")
Code Analysis 3% 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
It is important to fix the following items
- Do not distribute dangerous files with your plugin
- .bat - Batch File in Windows
- ☣ wp-content/plugins/hit-dhl-real-time-rates-and-shipping-label-xml-based/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,074 | 71,258 | 72,212 |
Markdown | 42 | 1,668 | 0 | 5,164 |
JSON | 36 | 4 | 0 | 3,250 |
XML | 7 | 1 | 5 | 279 |
XSLT | 2 | 23 | 20 | 209 |
Bourne Shell | 9 | 46 | 81 | 172 |
YAML | 4 | 10 | 0 | 98 |
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
This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 186)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.23 |
Average class complexity | 5.45 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 432.00 |
Average method complexity | 1.79 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 186.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,445 | |
▷ Static methods | 562 | 8.72% |
▷ Public methods | 5,711 | 88.61% |
▷ Protected methods | 235 | 3.65% |
▷ Private methods | 499 | 7.74% |
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.15MB with 0.09MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
controllors/views/hdhl.png | 6.93KB | 3.56KB | ▼ 48.66% |
controllors/views/dhl.png | 27.25KB | 10.29KB | ▼ 62.23% |
dhl.png | 119.73KB | 45.66KB | ▼ 61.87% |