89% shipfunk-woocommerce-shipping

Code Review | Shipfunk WooCommerce Shipping

WordPress plugin Shipfunk WooCommerce Shipping scored89%from 54 tests.

About plugin

  • Plugin page: shipfunk-woocomme...
  • Plugin version: 1.3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Nov 11, 2016
  • Latest release: Apr 12, 2023
  • Number of updates: 53
  • Update frequency: every 44.1 days
  • Top authors: shipfunk (86.79%)attemanninen (15.09%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /3,262 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼1.21ms] Passed 4 tests

Analyzing server-side resources used by Shipfunk WooCommerce Shipping
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.00 ▼5.26
Dashboard /wp-admin3.42 ▲0.1251.25 ▼0.11
Posts /wp-admin/edit.php3.54 ▲0.1851.71 ▲1.57
Add New Post /wp-admin/post-new.php6.00 ▲0.1295.38 ▼1.05
Media Library /wp-admin/upload.php3.34 ▲0.1238.61 ▲4.92

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Shipfunk WooCommerce Shipping
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.041.70 ▼0.5342.96 ▲0.32
Dashboard /wp-admin2,206 ▲155.88 ▼0.00101.99 ▼3.9641.34 ▲0.29
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0341.65 ▲6.6635.87 ▲1.00
Add New Post /wp-admin/post-new.php1,542 ▲2818.27 ▲0.76618.76 ▼39.4553.00 ▲0.35
Media Library /wp-admin/upload.php1,388 ▲64.22 ▲0.0297.18 ▼3.5341.05 ▼5.31

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
You can take inspiration from this readme.txt

shipfunk-woocommerce-shipping/shipping-shipfunk.php 92% from 13 tests

The principal PHP file in "Shipfunk WooCommerce Shipping" v. 1.3.5 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("shipfunk-woocommerce-shipping.php" instead of "shipping-shipfunk.php")

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
There were no executable files found in this plugin2,381 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP104097801,949
PO File1106110225
JavaScript2373196
CSS1108
Markdown1203

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity33.62
▷ Minimum class complexity3.00
▷ Maximum class complexity79.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods114
▷ Static methods2320.18%
▷ Public methods10894.74%
▷ Protected methods00.00%
▷ Private methods65.26%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin