62% webgoias-float-freeshipping-button-for-woocommerce

Code Review | Webgoias - Float Freeshipping Button for Woocommerce

WordPress plugin Webgoias - Float Freeshipping Button for Woocommerce scored62%from 54 tests.

About plugin

  • Plugin page: webgoias-float-fr...
  • Plugin version: 1.5.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 15, 2021
  • Latest release: Jul 12, 2021
  • Number of updates: 6
  • Update frequency: every 4.5 days
  • Top authors: rfbastos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /441 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.57MB] [CPU: ▼21.21ms] Passed 4 tests

This is a short check of server-side resources used by Webgoias - Float Freeshipping Button for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.98 ▲1.5251.98 ▲11.60
Dashboard /wp-admin4.51 ▲1.2138.87 ▼13.33
Posts /wp-admin/edit.php4.52 ▲1.1640.00 ▼16.75
Add New Post /wp-admin/post-new.php4.51 ▼1.3734.26 ▼57.26
Media Library /wp-admin/upload.php4.51 ▲1.2936.90 ▲2.51

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 456 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Webgoias - Float Freeshipping Button for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,080 ▲31918.48 ▲4.111.80 ▲0.2745.46 ▲5.58
Dashboard /wp-admin2,474 ▲2938.89 ▲3.18168.58 ▲48.7390.43 ▲43.59
Posts /wp-admin/edit.php2,423 ▲3206.12 ▲4.1282.04 ▲39.2186.86 ▲46.62
Add New Post /wp-admin/post-new.php1,618 ▲9019.79 ▼3.31741.78 ▲72.7638.02 ▼14.82
Media Library /wp-admin/upload.php1,554 ▲1546.51 ▲2.27106.48 ▲0.0366.67 ▲20.32
Float Freeshipping Button /wp-admin/crb_carbon_fields_container_float_freeshipping_button.php260.420.1216.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wbg_notice_dismiss' not found or invalid function name
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 112× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Key_Value_Datastore' not found in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/core/Datastore/Widget_Datastore.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/templates/Container/comment_meta.php:1
    • > PHP Notice
      Undefined variable: plural in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php on line 40
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Key_Value_Datastore' not found in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/core/Datastore/Theme_Options_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/core/Field/Textarea_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/core/Container/Comment_Meta_Container.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/core/Service/REST_API_Service.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/webgoias-float-freeshipping-button-for-woocommerce/vendor/htmlburger/carbon-fields/core/Container/Condition/Post_Ancestor_ID_Condition.php:10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/crb_carbon_fields_container_float_freeshipping_button.php
    • > Network (severe)
    wp-admin/crb_carbon_fields_container_float_freeshipping_button.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

webgoias-float-freeshipping-button-for-woocommerce/webgoias-float-freeshipping-button-for-woocommerce.php 85% from 13 tests

"Webgoias - Float Freeshipping Button for Woocommerce" version 1.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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 plugin27,846 lines of code in 403 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1715,1888,45912,933
PHP1442,5046,5648,852
PO File268191,0202,202
Sass4833901,769
CSS73251,1391,662
JSON400360
Markdown324068

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.32
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces22
Interfaces5
Traits0
Classes121
▷ Abstract classes119.09%
▷ Concrete classes11090.91%
▷ Final classes10.91%
Methods898
▷ Static methods9010.02%
▷ Public methods72981.18%
▷ Protected methods16518.37%
▷ Private methods40.45%
Functions110
▷ Named functions2926.36%
▷ Anonymous functions8173.64%
Constants34
▷ Global constants1132.35%
▷ Class constants2367.65%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icone.png1.79KB1.06KB▼ 40.78%
images/logo.png11.11KB4.51KB▼ 59.37%
images/imgCarrinho.png30.35KB12.21KB▼ 59.77%