84% dn-shipping-by-price

Code Review | DN Shipping by Price for WooCommerce

WordPress plugin DN Shipping by Price for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: dn-shipping-by-price
  • 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: Jun 25, 2022
  • Latest release: May 21, 2023
  • Number of updates: 5
  • Update frequency: every 116.4 days
  • Top authors: digireturn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /260 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼11.23ms] Passed 4 tests

A check of server-side resources used by DN Shipping by Price for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1036.65 ▼3.43
Dashboard /wp-admin3.41 ▲0.1043.23 ▼12.13
Posts /wp-admin/edit.php3.52 ▲0.1645.54 ▼2.52
Add New Post /wp-admin/post-new.php5.99 ▲0.1083.09 ▼26.84
Media Library /wp-admin/upload.php3.33 ▲0.1036.27 ▲5.39
DN Shipping by Price /wp-admin/admin.php?page=dn_shipping_by_price_manage3.3026.05

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

DN Shipping by Price for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.35 ▼0.961.60 ▼0.3841.04 ▼4.84
Dashboard /wp-admin2,206 ▲354.87 ▼0.99115.29 ▼11.6643.61 ▼1.72
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0442.43 ▲3.9040.34 ▲6.61
Add New Post /wp-admin/post-new.php1,533 ▼022.99 ▼0.12658.90 ▼26.8053.09 ▲0.90
Media Library /wp-admin/upload.php1,382 ▲34.26 ▼0.0299.97 ▼2.7243.93 ▲0.08
DN Shipping by Price /wp-admin/admin.php?page=dn_shipping_by_price_manage7842.0926.6827.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/dn-shipping-by-price/dn-shipping-by-price.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
9 plugin tags: price based, totale ordine, cart, prezzo, shipping...

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

The main PHP file in "DN Shipping by Price for WooCommerce" ver. 1.1.0 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:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin451 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1720346
PO File188149105

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png11.76KB0.65KB▼ 94.50%
images/logo.png16.22KB2.93KB▼ 81.92%