94% wp-e-commerce-default-lowest-shipping-choice

Code Review | WP e-Commerce Default Lowest Shipping Choice

WordPress plugin WP e-Commerce Default Lowest Shipping Choice scored 94% from 54 tests.

About plugin

  • Plugin page: wp-e-commerce-def...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.3
  • WordPress version: 5.8.1
  • First release: Oct 29, 2014
  • Latest release: Aug 10, 2015
  • Number of updates: 8
  • Update frequency: every 35.5 days
  • Top authors: leewillis77 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 574 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼141.32ms] Passed 4 tests

Server-side resources used by WP e-Commerce Default Lowest Shipping Choice
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0133.02 ▲0.54
Dashboard /wp-admin3.06 ▲0.0144.34 ▲7.70
Posts /wp-admin/edit.php3.12 ▲0.0145.66 ▼0.58
Add New Post /wp-admin/post-new.php5.42 ▼0.0186.87 ▼564.12
Media Library /wp-admin/upload.php3.01 ▲0.0132.66 ▼1.12

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WP e-Commerce Default Lowest Shipping Choice: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.05 ▲0.648.32 ▼2.4650.46 ▲7.56
Dashboard /wp-admin2,966 ▲325.90 ▼0.08151.14 ▲14.05114.31 ▲6.44
Posts /wp-admin/edit.php2,739 ▲32.72 ▲0.0177.42 ▲12.6990.01 ▲6.17
Add New Post /wp-admin/post-new.php1,672 ▲218.88 ▼0.27378.26 ▲11.00105.98 ▼2.50
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.02152.13 ▼4.46119.82 ▲1.23

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
Uninstall script ran successfully

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)
Even though no errors were found, 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-e-commerce-default-lowest-shipping-choice/wp-e-commerce-default-lowest-shipping-choice.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: shipping, default, wp e-commerce

wp-e-commerce-default-lowest-shipping-choice/wp-e-commerce-default-lowest-shipping-choice.php Passed 13 tests

The main PHP file in "WP e-Commerce Default Lowest Shipping Choice" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
131 characters long description:
This plugin changes the checkout logic for WP e-Commerce stores so that the lowest priced shipping rate will be selected by default

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
Good job! No executable or dangerous file extensions detected18 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP193318

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin