79% free-shipping-label

Code Review | Free Shipping Label and Progress Bar for WooCommerce

WordPress plugin Free Shipping Label and Progress Bar for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: free-shipping-label
  • Plugin version: 2.6.13
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.3
  • WordPress version: 6.3.1
  • First release: Jul 30, 2020
  • Latest release: Sep 20, 2023
  • Number of updates: 77
  • Update frequency: every 14.9 days
  • Top authors: MarinMatosevic (80.52%)devnethr (20.78%)

Code review

54 tests

User reviews

38 reviews

Install metrics

4,000+ active /49,881 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.14MB] [CPU: ▲19.33ms] 75% from 4 tests

Analyzing server-side resources used by Free Shipping Label and Progress Bar for WooCommerce
It is recommended to improve the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.14MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.01 ▲5.5563.77 ▲21.94
Dashboard /wp-admin9.03 ▲5.7380.58 ▲30.38
Posts /wp-admin/edit.php9.03 ▲5.6869.22 ▲23.66
Add New Post /wp-admin/post-new.php9.48 ▲3.59102.90 ▲1.78
Media Library /wp-admin/upload.php9.03 ▲5.8064.73 ▲29.94
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.0359.84

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 204 new files
Database: no new tables, 13 new options
New WordPress options
devnet_fsl_bar
fs_active_plugins
devnet_fsl
db_upgraded
fs_accounts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Free Shipping Label and Progress Bar for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.63 ▼0.751.73 ▼0.0729.51 ▼15.86
Dashboard /wp-admin2,227 ▲395.80 ▼0.0798.41 ▼20.9641.75 ▼8.69
Posts /wp-admin/edit.php2,113 ▲272.03 ▲0.0135.57 ▲0.4335.53 ▼1.70
Add New Post /wp-admin/post-new.php1,523 ▼1022.96 ▼0.18608.12 ▼42.9352.46 ▼13.08
Media Library /wp-admin/upload.php1,412 ▲214.25 ▲0.0498.58 ▼1.6846.83 ▲3.66
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0841.8428.2534.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/free-shipping-label/fs/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 13 options in the database
    • widget_recent-posts
    • devnet_fsl
    • theysaidso_admin_options
    • devnet_fsl_label
    • devnet_fsl_bar
    • widget_recent-comments
    • can_compress_scripts
    • devnet_fsl_general
    • fs_debug_mode
    • fs_accounts
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

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

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

free-shipping-label/free-shipping-label.php 92% from 13 tests

This is the main PHP file of "Free Shipping Label and Progress Bar for WooCommerce" version 2.6.13, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.5" instead of "3.5.1")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin35,297 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1358,33817,97135,082
JavaScript63669199
CSS160016

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity78.77
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes61
▷ Abstract classes23.28%
▷ Concrete classes5996.72%
▷ Final classes00.00%
Methods1,359
▷ Static methods22016.19%
▷ Public methods96370.86%
▷ Protected methods171.25%
▷ Private methods37927.89%
Functions109
▷ Named functions10495.41%
▷ Anonymous functions54.59%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
fs/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
fs/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%