84% per-product-flat-rate-shipping-for-wc

Code Review | Per Product Flat Rate Shipping for WooCommerce

WordPress plugin Per Product Flat Rate Shipping for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: per-product-flat-...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9.3
  • WordPress version: 6.3.1
  • First release: Feb 22, 2020
  • Latest release: May 19, 2022
  • Number of updates: 11
  • Update frequency: every 74.3 days
  • Top authors: jsherk (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active /1,504 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
Install script ran successfully

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

An overview of server-side resources used by Per Product Flat Rate Shipping for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.41 ▼5.00
Dashboard /wp-admin3.32 ▼0.0247.35 ▼13.60
Posts /wp-admin/edit.php3.37 ▲0.0246.19 ▼1.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.73 ▼11.11
Media Library /wp-admin/upload.php3.24 ▲0.0237.95 ▲2.01

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Per Product Flat Rate Shipping for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.33 ▼1.051.83 ▲0.2540.81 ▲0.90
Dashboard /wp-admin2,224 ▲184.88 ▼0.9998.62 ▼9.5339.93 ▼1.98
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0237.26 ▲0.8433.42 ▼3.33
Add New Post /wp-admin/post-new.php1,427 ▼11317.97 ▼0.41582.95 ▼35.5363.17 ▲16.75
Media Library /wp-admin/upload.php1,403 ▲34.26 ▲0.0596.25 ▼9.7046.92 ▲0.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/per-product-flat-rate-shipping-for-wc/per-product-flat-rate-shipping-for-wc.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: woocommerce, flatrate shipping, domestic, flat rate, flatrate...

per-product-flat-rate-shipping-for-wc/per-product-flat-rate-shipping-for-wc.php Passed 13 tests

"Per Product Flat Rate Shipping for WooCommerce" version 1.0.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
121 characters long description:
Set seperate flat-rate shipping costs for both Domestic and International shipping on a per product basis in WooCommerce.

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
There were no executable files found in this plugin353 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP18766353

PHP code Passed 2 tests

An short overview of 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.18
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dbut.png13.46KB6.06KB▼ 55.01%
stars-small.png1.50KB1.51KB0.00%
dbut-small.png5.33KB2.67KB▼ 49.92%