67% woo-tools

Code Review | WooCommerce Tools

WordPress plugin WooCommerce Tools scored67%from 54 tests.

About plugin

  • Plugin page: woo-tools
  • Plugin version: 1.2.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 9, 2018
  • Latest release: Sep 12, 2022
  • Number of updates: 27
  • Update frequency: every 57.7 days
  • Top authors: ThemeFarmer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20,000+ active /114,060 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.39MB] [CPU: ▼4.42ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.4141.74 ▼0.04
Dashboard /wp-admin3.74 ▲0.3951.56 ▼6.91
Posts /wp-admin/edit.php3.79 ▲0.4348.32 ▼2.48
Add New Post /wp-admin/post-new.php6.27 ▲0.3898.83 ▼8.24
Media Library /wp-admin/upload.php3.60 ▲0.3637.69 ▲5.07
Wishlist /wp-admin/admin.php?page=tfwctool-wishlist3.5935.60
WooCommerce Tools /wp-admin/admin.php?page=tfwctool3.5733.97
Compare /wp-admin/admin.php?page=tfwctool-compare3.5731.24
Dashboard /wp-admin/admin.php?page=woocommerce-tools3.5733.59
Quick View /wp-admin/admin.php?page=tfwctool-quick-view3.5733.57

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 91 new files
Database: 2 new tables, 12 new options
New tables
wp_tfwctool_wishlist_items
wp_tfwctool_wishlist_lists
New WordPress options
tfwctool_wishlist
theysaidso_admin_options
tfwctool_wishlist_page_id
db_upgraded
tfwctool_quickview
widget_tfwctool_wishlist_widget
widget_theysaidso_widget
widget_recent-comments
widget_tfwctool_ajax_search_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Tools
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲17613.68 ▼0.689.22 ▲7.4146.34 ▲2.39
Dashboard /wp-admin2,258 ▲785.04 ▼0.63102.44 ▲15.8141.29 ▼3.03
Posts /wp-admin/edit.php2,144 ▲442.44 ▲0.4336.58 ▼1.3832.35 ▼3.64
Add New Post /wp-admin/post-new.php1,594 ▲5818.42 ▲0.44624.04 ▲26.4849.59 ▼13.46
Media Library /wp-admin/upload.php1,467 ▲674.56 ▲0.3089.71 ▼11.6039.49 ▼3.16
Wishlist /wp-admin/admin.php?page=tfwctool-wishlist1,0212.3435.1426.28
WooCommerce Tools /wp-admin/admin.php?page=tfwctool9832.1028.0728.10
Compare /wp-admin/admin.php?page=tfwctool-compare9192.1228.6528.50
Dashboard /wp-admin/admin.php?page=woocommerce-tools9622.1129.6927.43
Quick View /wp-admin/admin.php?page=tfwctool-quick-view9122.1228.5225.24

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 uninstall procedure failed, leaving 2 tables in the database
    • wp_tfwctool_wishlist_lists
    • wp_tfwctool_wishlist_items
  • Zombie WordPress options detected upon uninstall: 12 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • tfwctool_wishlist
    • widget_tfwctool_ajax_search_widget
    • widget_tfwctool_wishlist_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • tfwctool_quickview
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-tools/templates/quick-view-model.php
    • > /wp-content/plugins/woo-tools/templates/compare-model.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/woo-tools/templates/quick-view-product-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-tools/admin/option-pages/quickview-options.php:2
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/woo-tools/templates/compare-quick-model.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woo-tools/templates/wishlist-empty.php:2
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/woo-tools/templates/compare-quick-model.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-tools/admin/option-pages/wishlist-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/woo-tools/templates/compare-quick-model.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_id() on null in wp-content/plugins/woo-tools/templates/compare-button.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/woo-tools/templates/quick-view-button.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-tools/admin/option-pages/compare-options.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

woo-tools/woo-tools.php 77% from 13 tests

The principal PHP file in "WooCommerce Tools" v. 1.2.9 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 157 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected8,994 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121,2163454,947
PHP414893812,739
CSS11207271,308

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.27
▷ Minimum class complexity2.00
▷ Maximum class complexity55.00
Average method complexity2.93
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods108
▷ Static methods109.26%
▷ Public methods7569.44%
▷ Protected methods1211.11%
▷ Private methods2119.44%
Functions45
▷ Named functions4497.78%
▷ Anonymous functions12.22%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/compare-icon.png3.87KB0.64KB▼ 83.48%
admin/assets/images/ajax-search-icon.png7.96KB2.40KB▼ 69.90%
admin/assets/images/wishlist-icon.png5.97KB1.61KB▼ 73.01%
admin/assets/images/quick-view-icon.png8.20KB2.14KB▼ 73.85%
admin/assets/images/placeholder_plugin.png6.41KB3.01KB▼ 53.08%