83% rhx-woo-product-carousel

Code Review | RHX Woocommerce Product Carousel

WordPress plugin RHX Woocommerce Product Carousel scored83%from 54 tests.

About plugin

  • Plugin page: rhx-woo-product-c...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2022
  • Latest release: Apr 20, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: xihad1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.71ms] Passed 4 tests

Analyzing server-side resources used by RHX Woocommerce Product Carousel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0348.60 ▲7.66
Dashboard /wp-admin3.32 ▼0.0252.16 ▼7.92
Posts /wp-admin/edit.php3.44 ▲0.0847.50 ▼4.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.01 ▼11.40
Media Library /wp-admin/upload.php3.25 ▲0.0236.55 ▲0.66

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
rhx_woo_version
widget_theysaidso_widget
widget_recent-posts
rhx_woo_installed
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

RHX Woocommerce Product Carousel: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.35 ▲0.241.69 ▼0.0344.03 ▲0.09
Dashboard /wp-admin2,211 ▲345.67 ▲0.0288.90 ▲0.0039.75 ▼0.08
Posts /wp-admin/edit.php2,116 ▲162.01 ▼0.0034.48 ▼1.7234.91 ▲2.51
Add New Post /wp-admin/post-new.php1,539 ▲1023.36 ▼0.28674.43 ▲39.3654.44 ▼4.49
Media Library /wp-admin/upload.php1,410 ▲104.20 ▲0.05107.84 ▲2.7344.41 ▲1.20

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • rhx_woo_version
    • widget_recent-comments
    • db_upgraded
    • rhx_woo_installed

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 | 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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rhx-woo-product-carousel/includes/Dynamic-style.php:69

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Product Carousel Settings), #2 (Back End), #3 (Front End)
The official readme.txt might help

rhx-woo-product-carousel/rhx-woo-carousel.php 77% from 13 tests

"RHX Woocommerce Product Carousel" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 241 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("rhx-woo-product-carousel.php" instead of "rhx-woo-carousel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected575 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP992135376
CSS41523152
JavaScript3111547

PHP code Passed 2 tests

A short 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.25
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods20
▷ Static methods15.00%
▷ Public methods1995.00%
▷ Protected methods00.00%
▷ Private methods15.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin