83% wc-best-selling-products-lite

Code Review | Best Selling Products For WooCommerce

WordPress plugin Best Selling Products For WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: wc-best-selling-p...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2023
  • Latest release: Mar 25, 2023
  • Number of updates: 2
  • Update frequency: every 18.5 days
  • Top authors: pluginchef (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 212 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼6.89ms] Passed 4 tests

A check of server-side resources used by Best Selling Products For WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.35 ▼0.82
Dashboard /wp-admin3.40 ▲0.0249.09 ▼20.06
Posts /wp-admin/edit.php3.51 ▲0.1644.41 ▼1.39
Add New Post /wp-admin/post-new.php5.98 ▲0.1085.77 ▼5.27
Media Library /wp-admin/upload.php3.32 ▲0.0937.52 ▼0.04

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Best Selling Products For WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.24 ▼1.341.82 ▲0.0243.73 ▼1.13
Dashboard /wp-admin2,212 ▲214.86 ▲0.02114.11 ▲14.3043.03 ▼1.83
Posts /wp-admin/edit.php2,095 ▲62.02 ▼0.0334.36 ▼2.3933.77 ▲1.19
Add New Post /wp-admin/post-new.php1,520 ▼1317.62 ▼5.74656.24 ▼192.0753.93 ▼8.55
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0196.23 ▼5.4842.79 ▼2.90

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

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

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-best-selling-products-lite/best-selling-products-for-woocommerce.php:32
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wc-best-selling-products-lite/inc/view.settings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

wc-best-selling-products-lite/best-selling-products-for-woocommerce.php 77% from 13 tests

The entry point to "Best Selling Products For WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wc-best-selling-products-lite.php" instead of "best-selling-products-for-woocommerce.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin10,760 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS37493310,171
PHP320712581
JavaScript1308

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity43.50
▷ Minimum class complexity29.00
▷ Maximum class complexity58.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png1.75KB1.33KB▼ 24.14%
assets/images/design_three.png17.74KB8.13KB▼ 54.16%
assets/images/design_one.png13.72KB6.67KB▼ 51.40%
assets/images/design_two.png12.92KB6.55KB▼ 49.32%