83% floating-product-category-for-woocommerce

Code Review | Floating Product Category for WooCommerce

WordPress plugin Floating Product Category for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: floating-product-...
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.0
  • WordPress version: 6.3.1
  • First release: Jun 5, 2022
  • Latest release: Jun 5, 2022
  • Number of updates: 6
  • Update frequency: every 52.3 days
  • Top authors: userelements (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /552 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.01MB] [CPU: ▼7.83ms] Passed 4 tests

An overview of server-side resources used by Floating Product Category for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0725.25 ▼19.83
Dashboard /wp-admin3.31 ▲0.0166.19 ▲17.36
Posts /wp-admin/edit.php3.36 ▲0.0149.29 ▲2.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.11 ▼15.51
Media Library /wp-admin/upload.php3.23 ▲0.0038.91 ▲2.00

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Floating Product Category for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲11513.55 ▼0.814.32 ▲2.0642.80 ▼2.02
Dashboard /wp-admin2,206 ▲215.79 ▲0.89117.20 ▲10.7049.17 ▲6.48
Posts /wp-admin/edit.php2,086 ▼31.97 ▼0.0536.56 ▼4.1533.23 ▼3.73
Add New Post /wp-admin/post-new.php1,537 ▼223.14 ▲0.06685.96 ▲81.5449.28 ▼6.48
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.04109.97 ▲10.6348.07 ▲5.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-product-category-for-woocommerce/includes/floating-customizer-styles.php:41
    • > PHP Notice
      Undefined variable: prod_categories_query in wp-content/plugins/floating-product-category-for-woocommerce/view/product-cat.template-simple.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_terms() on null in wp-content/plugins/floating-product-category-for-woocommerce/view/product-cat.template-simple.php:2
    • > PHP Notice
      Undefined variable: prod_categories_query in wp-content/plugins/floating-product-category-for-woocommerce/view/product-cat.template-image.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_terms() on null in wp-content/plugins/floating-product-category-for-woocommerce/view/product-cat.template-image.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/floating-product-category-for-woocommerce/includes/floating-customizer-styles.php:41

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: product category, popup, floating, woocommerce, sticky

floating-product-category-for-woocommerce/floating-product-category.php 69% from 13 tests

The principal PHP file in "Floating Product Category for WooCommerce" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("floating-product-category-for-woocommerce.php" instead of "floating-product-category.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
  • Description: The description should be shorter than 140 characters (currently 195 characters long)
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin471 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP66450283
CSS1401158
JavaScript16630

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin