78% wc-pratkabg-shipping

Code Review | Pratkabg Shipping for WooCommerce

WordPress plugin Pratkabg Shipping for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: wc-pratkabg-shipping
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Feb 6, 2023
  • Latest release: Feb 20, 2023
  • Number of updates: 3
  • Update frequency: every 5.3 days
  • Top authors: pratka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /132 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Pratkabg Shipping for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0048.68 ▲8.96
Dashboard /wp-admin3.31 ▼0.0456.38 ▼7.70
Posts /wp-admin/edit.php3.36 ▲0.0053.18 ▲3.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.35 ▼1.47
Media Library /wp-admin/upload.php3.23 ▲0.0036.63 ▲0.34

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Pratkabg Shipping for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.55 ▼0.821.94 ▲0.2243.80 ▲1.99
Dashboard /wp-admin2,206 ▲185.92 ▲0.07103.66 ▼10.7939.57 ▼1.99
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0140.88 ▲0.3235.81 ▼1.02
Add New Post /wp-admin/post-new.php1,542 ▲2818.32 ▲0.81615.74 ▼79.3658.42 ▼1.77
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0898.15 ▼11.0741.98 ▼4.00

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-pratkabg-shipping/public/partials/woo-pratkabg-shipping-public-display.php
    • > /wp-content/plugins/wc-pratkabg-shipping/admin/partials/woo-pratkabg-shipping-admin-display.php
    • > /wp-content/plugins/wc-pratkabg-shipping/public/partials/woops-tracker-form.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/wc-pratkabg-shipping/includes/woo/class-wc-shipping-ecount.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/wc-pratkabg-shipping/includes/woo/class-wc-shipping-evropat.php:11

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (This is main plugin settings screen we will find under WooCommerce Settings Page.), #2 (This is a particular shipping zone setting screen where you have to add enable Pratkabg Shipping methods as shown in the screenshot.), #3 (This is WooCommerce checkout screen describes how the Pratkabg shipping method will be shown with the shipping calculated shipping costs.), #4 (This is the WooCommerce order admin screen. All sections marked by the red box are added by this plugin. The left two sections are destinations details and the right one shows the button to view and print the shipping label.)
The official readme.txt is a good inspiration

wc-pratkabg-shipping/wc-pratkabg-shipping.php 92% from 13 tests

"Pratkabg Shipping for WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Git Repository: A Git repository was detected inside this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin987 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16317687969
CSS22812
JavaScript24546

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.40
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity2.54
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods61
▷ Static methods23.28%
▷ Public methods5691.80%
▷ Protected methods00.00%
▷ Private methods58.20%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.72MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png76.70KB19.43KB▼ 74.66%
assets/screenshot-4.png148.73KB49.16KB▼ 66.94%
assets/screenshot-2.png105.98KB30.98KB▼ 70.77%
assets/screenshot-1.png272.47KB75.68KB▼ 72.22%
assets/screenshot-3.png136.53KB37.38KB▼ 72.62%