84% best-seller-for-woocommerce

Code Review | Best Seller For WooCommerce

WordPress plugin Best Seller For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: best-seller-for-w...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 8, 2023
  • Latest release: Jul 2, 2023
  • Number of updates: 6
  • Update frequency: every 16.0 days
  • Top authors: grandplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /428 total downloads

Benchmarks

Plugin footprint 83% 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.00MB] [CPU: ▼2.26ms] Passed 4 tests

Server-side resources used by Best Seller For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.51 ▲4.11
Dashboard /wp-admin3.31 ▲0.0042.05 ▼4.72
Posts /wp-admin/edit.php3.36 ▲0.0043.50 ▼3.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.45 ▼0.64
Media Library /wp-admin/upload.php3.23 ▲0.0031.57 ▲0.23

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 105 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Best Seller For WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.65 ▼0.621.82 ▲0.1339.85 ▼3.50
Dashboard /wp-admin2,200 ▲125.80 ▼0.02102.09 ▼2.3337.80 ▼2.31
Posts /wp-admin/edit.php2,089 ▼01.96 ▼0.0838.34 ▲1.8931.54 ▼2.97
Add New Post /wp-admin/post-new.php1,542 ▲418.50 ▲0.35636.54 ▼9.0262.10 ▲9.57
Media Library /wp-admin/upload.php1,388 ▲34.22 ▼0.0093.22 ▼6.8739.98 ▼2.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Data\\Base\\Data' not found in wp-content/plugins/best-seller-for-woocommerce/includes/Data/Base/OptionsData.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Backgrounds\\Base\\AsyncRequest' not found in wp-content/plugins/best-seller-for-woocommerce/includes/Backgrounds/Base/BackgroundProcess.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Backgrounds\\AutoBackgrounds\\AutoBackgroundProcess' not found in wp-content/plugins/best-seller-for-woocommerce/includes/Backgrounds/AutoBackgrounds/BestSellersBackground.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Base' not found in wp-content/plugins/best-seller-for-woocommerce/includes/Settings/SettingsFields/Field.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Base' not found in wp-content/plugins/best-seller-for-woocommerce/includes/BestSellerProduct.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Settings\\SettingsBase\\Settings' not found in wp-content/plugins/best-seller-for-woocommerce/includes/Settings/MainSettings.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Backgrounds\\Base\\BackgroundProcess' not found in wp-content/plugins/best-seller-for-woocommerce/includes/Backgrounds/AutoBackgrounds/AutoBackgroundProcess.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Base' not found in wp-content/plugins/best-seller-for-woocommerce/includes/BestSellerShortcodes.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Base' not found in wp-content/plugins/best-seller-for-woocommerce/includes/BestSellerQueries.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GPLSCore\\GPLS_PLUGIN_WOBTSLR\\Base' not found in wp-content/plugins/best-seller-for-woocommerce/includes/Backgrounds/Base/AsyncRequest.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% 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
These attributes need your attention: You can look at the official readme.txt

best-seller-for-woocommerce/gpls-wobtslr-woo-best-seller.php 92% from 13 tests

Analyzing the main PHP file in "Best Seller For WooCommerce" version 1.0.4
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("best-seller-for-woocommerce.php" instead of "gpls-wobtslr-woo-best-seller.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin5,163 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP528732,6775,131
JavaScript72626
CSS6056

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity16.70
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces14
Interfaces0
Traits6
Classes34
▷ Abstract classes823.53%
▷ Concrete classes2676.47%
▷ Final classes27.69%
Methods364
▷ Static methods9325.55%
▷ Public methods22762.36%
▷ Protected methods8021.98%
▷ Private methods5715.66%
Functions10
▷ Named functions770.00%
▷ Anonymous functions330.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
24 PNG files occupy 0.23MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/best-seller-icon-8.png3.97KB2.08KB▼ 47.66%
assets/images/text-badge.png1.97KB1.51KB▼ 23.23%
includes/Core/assets/images/wp-watermark-pdf.png30.70KB10.89KB▼ 64.53%
includes/Core/assets/dist/images/logo-icon-sm.png0.62KB0.72KB0.00%
includes/Core/assets/images/wp-watermark-images.png38.45KB14.82KB▼ 61.45%