79% featured-products-first-for-woocommerce

Code Review | Featured Products First for WooCommerce - A Extension of WooCommerce (WooCommerce Addon Plugin)

WordPress plugin Featured Products First for WooCommerce - A Extension of WooCommerce (WooCommerce Addon Plugin) scored79%from 54 tests.

About plugin

  • Plugin page: featured-products...
  • Plugin version: 1.9.6
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 30, 2016
  • Latest release: Jul 21, 2023
  • Number of updates: 102
  • Update frequency: every 23.8 days
  • Top authors: pmbaldha (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /22,925 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.33MB] [CPU: ▲21.00ms] 75% from 4 tests

Analyzing server-side resources used by Featured Products First for WooCommerce - A Extension of WooCommerce (WooCommerce Addon Plugin)
It is recommended to improve the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.33MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.20 ▲5.7458.76 ▲20.19
Dashboard /wp-admin9.22 ▲5.9170.10 ▲18.19
Posts /wp-admin/edit.php9.22 ▲5.8666.87 ▲21.52
Add New Post /wp-admin/post-new.php9.70 ▲3.81107.51 ▲24.09
Media Library /wp-admin/upload.php9.22 ▲5.9969.87 ▲34.54
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.2263.91

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 199 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
widget_theysaidso_widget
can_compress_scripts
fs_accounts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
fs_active_plugins

Browser metrics Passed 4 tests

A check of browser resources used by Featured Products First for WooCommerce - A Extension of WooCommerce (WooCommerce Addon Plugin)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.34 ▼0.031.49 ▼0.2129.66 ▼18.20
Dashboard /wp-admin2,215 ▲385.61 ▲0.1197.88 ▲8.3844.79 ▲4.39
Posts /wp-admin/edit.php2,118 ▲181.99 ▲0.0534.78 ▼1.5134.07 ▼6.97
Add New Post /wp-admin/post-new.php1,531 ▲323.01 ▲0.01682.43 ▲17.5960.90 ▼3.18
Media Library /wp-admin/upload.php1,414 ▲174.22 ▼0.00104.07 ▼8.1648.27 ▲0.78
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0851.6928.8032.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/featured-products-first-for-woocommerce/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • fs_accounts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • fs_debug_mode
    • fs_active_plugins

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: woocommerce, product, featured

featured-products-first-for-woocommerce/featured-products-first-for-woocommerce.php 92% from 13 tests

This is the main PHP file of "Featured Products First for WooCommerce - A Extension of WooCommerce (WooCommerce Addon Plugin)" version 1.9.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "4.8.1")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected34,861 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
PHP1288,08817,53434,255
JavaScript43660214
Markdown1680214
PO File14044115
JSON20050
CSS130013

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity86.04
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
Methods1,292
▷ Static methods19715.25%
▷ Public methods89469.20%
▷ Protected methods171.32%
▷ Private methods38129.49%
Functions101
▷ Named functions101100.00%
▷ Anonymous functions00.00%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.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
3 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/images/settings.png48.26KB49.18KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%