62% tips-donations-woo

Code Review | Tips & Donations for WooCommerce

WordPress plugin Tips & Donations for WooCommerce scored62%from 54 tests.

About plugin

  • Plugin page: tips-donations-woo
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Jun 23, 2021
  • Latest release: Jun 23, 2021
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: andreijluca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /377 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.54MB] [CPU: ▲6.91ms] Passed 4 tests

Analyzing server-side resources used by Tips & Donations for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.04 ▲1.5747.61 ▲6.09
Dashboard /wp-admin4.84 ▲1.5458.94 ▲10.88
Posts /wp-admin/edit.php4.95 ▲1.6065.44 ▲22.56
Add New Post /wp-admin/post-new.php7.43 ▲1.5592.32 ▼0.99
Media Library /wp-admin/upload.php4.74 ▲1.5146.49 ▲11.65

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 514 new files
Database: 1 new table, 7 new options
New tables
wp_thegoodplugin_tips
New WordPress options
can_compress_scripts
widget_recent-comments
thegoodplugin_db_version
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Tips & Donations for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,217 ▲44620.66 ▲6.266.16 ▲3.7828.81 ▼19.04
Dashboard /wp-admin2,545 ▲36010.64 ▲4.74204.78 ▲89.32102.30 ▲56.29
Posts /wp-admin/edit.php2,432 ▲3437.24 ▲5.2198.84 ▲62.2679.12 ▲42.90
Add New Post /wp-admin/post-new.php1,619 ▲8619.92 ▼3.24749.56 ▲74.4839.16 ▼20.30
Media Library /wp-admin/upload.php1,568 ▲1808.35 ▲3.91125.35 ▲11.9680.76 ▲33.01
Tips & Donations /wp-admin/crb_carbon_fields_container_thegoodplugin_opts.php260.440.0914.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_thegoodplugin_tips
  • This plugin does not fully uninstall, leaving 7 options in the database
    • thegoodplugin_db_version
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/tips-donations-woo/public/partials/thegoodplugin-public-display.php
    • > /wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 120× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\File_Field' not found in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/core/Field/Image_Field.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/templates/Container/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Datastore' not found in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/core/Datastore/Key_Value_Datastore.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Event\\PersistentListener' not found in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/core/Event/SingleEventListener.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Predefined_Options_Field' not found in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/core/Field/Multiselect_Field.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/core/Field/Broken_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Scripts_Field' not found in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/core/Field/Footer_Scripts_Field.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/core/Container/Condition/Current_User_ID_Condition.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/core/Container/Condition/User_Capability_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/tips-donations-woo/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2

User-side errors 0% from 1 test

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

Optimizations

Plugin configuration 96% from 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
6 plugin tags: woocommerce, addon, tips, donation, tip...

tips-donations-woo/thegoodplugin.php 92% from 13 tests

The entry point to "Tips & Donations for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("tips-donations-woo.php" instead of "thegoodplugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin30,542 lines of code in 448 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1815,3598,73913,626
PHP1662,8857,2269,716
CSS114331,1582,359
PO File278231,0242,223
Sass4937001,945
JSON800525
Markdown4450146
SVG2002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.07
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces25
Interfaces6
Traits0
Classes132
▷ Abstract classes118.33%
▷ Concrete classes12191.67%
▷ Final classes10.83%
Methods950
▷ Static methods10711.26%
▷ Public methods77481.47%
▷ Protected methods16617.47%
▷ Private methods101.05%
Functions120
▷ Named functions3529.17%
▷ Anonymous functions8570.83%
Constants37
▷ Global constants1232.43%
▷ Class constants2567.57%
▷ Public constants25100.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png14.16KB6.80KB▼ 51.98%
assets/banner-772x250.png28.81KB11.92KB▼ 58.64%