83% frequently-bought-together-product-for-woocommerce

Code Review | Frequently Bought Together Product For Woocommerce

WordPress plugin Frequently Bought Together Product For Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: frequently-bought...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2022
  • Latest release: Oct 2, 2023
  • Number of updates: 5
  • Update frequency: every 70.6 days
  • Top authors: silverplugins217 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /331 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼9.35ms] Passed 4 tests

Server-side resources used by Frequently Bought Together Product For Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6019.98 ▼18.70
Dashboard /wp-admin3.35 ▲0.0059.52 ▲1.54
Posts /wp-admin/edit.php3.21 ▼0.1438.36 ▼6.58
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.29 ▼13.64
Media Library /wp-admin/upload.php3.27 ▲0.0444.21 ▲13.13

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by Frequently Bought Together Product For Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,497 ▼26413.17 ▼1.120.49 ▼1.1118.59 ▼21.88
Dashboard /wp-admin2,247 ▲705.77 ▲0.1787.42 ▲1.2840.47 ▼5.22
Posts /wp-admin/edit.php45 ▼2,0550.42 ▼1.620.09 ▼37.029.71 ▼22.42
Add New Post /wp-admin/post-new.php1,571 ▲4323.31 ▲0.13689.72 ▲7.9945.66 ▼15.75
Media Library /wp-admin/upload.php1,452 ▲524.48 ▲0.26103.48 ▲2.9647.68 ▲0.21

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/frequently-bought-together-product-for-woocommerce/frequently-bought-together-product-for-woocommmerce.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frequently-bought-together-product-for-woocommerce/main/frontend/fbtpfw-front.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frequently-bought-together-product-for-woocommerce/main/resources/fbtpfw-installation-require.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frequently-bought-together-product-for-woocommerce/main/resources/fbtpfw-load-js-css.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frequently-bought-together-product-for-woocommerce/main/backend/fbtpfw-backend.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/frequently-bought-together-product-for-woocommerce/main/resources/fbtpfw-language.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Contributors: Contributors not specified
The official readme.txt might help

frequently-bought-together-product-for-woocommerce/frequently-bought-together-product-for-woocommmerce.php 85% from 13 tests

Analyzing the main PHP file in "Frequently Bought Together Product For Woocommerce" version 1.0
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("frequently-bought-together-product-for-woocommerce.php" instead of "frequently-bought-together-product-for-woocommmerce.php")
  • 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 programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,852 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP92641182,077
JavaScript392146485
CSS21112290

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/icon.png6.84KB4.18KB▼ 38.90%