83% woo-category-slider-for-elementor

Code Review | Product Category Slider for Elementor

WordPress plugin Product Category Slider for Elementor scored83%from 54 tests.

About plugin

  • Plugin page: woo-category-slid...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Sep 16, 2019
  • Latest release: May 31, 2021
  • Number of updates: 9
  • Update frequency: every 161.3 days
  • Top authors: mdimran41 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /17,213 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.31ms] Passed 4 tests

Analyzing server-side resources used by Product Category Slider for Elementor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.74 ▲0.34
Dashboard /wp-admin3.35 ▲0.0450.06 ▲1.69
Posts /wp-admin/edit.php3.40 ▲0.0448.26 ▲0.02
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.91 ▼15.27
Media Library /wp-admin/upload.php3.27 ▲0.0441.63 ▲4.97

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Product Category Slider for Elementor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,958 ▲21213.71 ▼0.747.06 ▲4.8745.31 ▲1.46
Dashboard /wp-admin2,249 ▲615.86 ▼0.04100.90 ▼6.6443.04 ▲4.62
Posts /wp-admin/edit.php2,131 ▲422.06 ▲0.0241.86 ▲0.7536.07 ▼0.47
Add New Post /wp-admin/post-new.php1,552 ▲1023.50 ▲5.36702.60 ▲75.1254.33 ▼2.88
Media Library /wp-admin/upload.php1,434 ▲494.25 ▲0.18100.77 ▼6.5148.00 ▲1.32

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-category-slider-for-elementor/pcsfe_elementor.php:73

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

woo-category-slider-for-elementor/pcsfe_mian.php 77% from 13 tests

The main file in "Product Category Slider for Elementor" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-category-slider-for-elementor.php" instead of "pcsfe_mian.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 311 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected7,348 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
CSS4349533,257
JavaScript35139672,124
PHP41872801,967

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity14.25
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods25
▷ Static methods14.00%
▷ Public methods2184.00%
▷ Protected methods416.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.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
PNG images were not found in this plugin