84% dn-shipping-by-weight

Code Review | DN Shipping by Weight for WooCommerce

WordPress plugin DN Shipping by Weight for WooCommerce scored 84% from 54 tests.

About plugin

  • Plugin page: dn-shipping-by-we...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2020
  • Latest release: May 21, 2023
  • Number of updates: 10
  • Update frequency: every 90.9 days
  • Top authors: digireturn (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active / 942 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.13ms] Passed 4 tests

A check of server-side resources used by DN Shipping by Weight for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.86 ▼0.21
Dashboard /wp-admin3.31 ▲0.0143.99 ▼5.52
Posts /wp-admin/edit.php3.37 ▲0.0149.84 ▲2.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.62 ▼13.22
Media Library /wp-admin/upload.php3.24 ▲0.0139.96 ▲5.95
DN Shipping by Weight /wp-admin/admin.php?page=dn_shipping_by_weight_menage3.2031.01

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for DN Shipping by Weight for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.65 ▼0.721.78 ▲0.0642.68 ▲3.33
Dashboard /wp-admin2,209 ▲214.87 ▼1.0498.01 ▼5.3239.58 ▼2.42
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0140.06 ▲4.9334.58 ▲3.55
Add New Post /wp-admin/post-new.php1,533 ▼322.03 ▼1.25678.32 ▲57.5158.39 ▼2.46
Media Library /wp-admin/upload.php1,388 ▲64.24 ▼0.0393.59 ▼4.0342.92 ▼1.58
DN Shipping by Weight /wp-admin/admin.php?page=dn_shipping_by_weight_menage7892.0325.1525.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dn-shipping-by-weight/dn-shipping-by-weight.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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: weight, woocommerce, peso, weight based, shipping...

dn-shipping-by-weight/dn-shipping-by-weight.php 92% from 13 tests

The main file in "DN Shipping by Weight for WooCommerce" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin889 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File3264393448
PHP1518441

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png17.63KB2.96KB▼ 83.21%
images/icon.png12.10KB0.92KB▼ 92.37%