72% ect-product-carousel

Code Review | ECT Product Carousel

WordPress plugin ECT Product Carousel scored72%from 54 tests.

About plugin

  • Plugin page: ect-product-carousel
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 10, 2013
  • Latest release: Sep 2, 2019
  • Number of updates: 39
  • Update frequency: every 59.1 days
  • Top authors: etemplates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /6,715 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by ECT Product Carousel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.62 ▼2.63
Dashboard /wp-admin3.36 ▲0.0244.40 ▼16.13
Posts /wp-admin/edit.php3.41 ▲0.0649.52 ▲2.51
Add New Post /wp-admin/post-new.php5.94 ▲0.0695.46 ▼11.41
Media Library /wp-admin/upload.php3.28 ▲0.0635.71 ▲2.90
Settings /wp-admin/admin.php?page=ect_prod_set3.2231.21
ECT Product Carousel /wp-admin/admin.php?page=ect_prod3.2529.38
Add New /wp-admin/admin.php?page=ect_prod_add3.2529.31

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 19 new options
New WordPress options
ect_prod_sett_tab_chg
ect_prod_sett_animated_speed
ect_prod_sett_enable_break
widget_theysaidso_widget
can_compress_scripts
ect_prod_sett_port_visi
ect_prod_sett_list_prod
ect_prod_sett_visible_prod
ect_prod_sett_land_chg
theysaidso_admin_options
...

Browser metrics Passed 4 tests

ECT Product Carousel: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16713.66 ▼1.007.15 ▲5.4039.14 ▼4.32
Dashboard /wp-admin2,233 ▲424.94 ▼0.94103.26 ▼5.3792.14 ▲44.82
Posts /wp-admin/edit.php2,119 ▲332.15 ▲0.1339.86 ▲3.9836.72 ▼0.79
Add New Post /wp-admin/post-new.php1,547 ▲523.53 ▲5.17733.85 ▲83.1858.44 ▲8.83
Media Library /wp-admin/upload.php1,412 ▲214.22 ▲0.0194.88 ▼4.2575.13 ▲30.62
Settings /wp-admin/admin.php?page=ect_prod_set9692.0322.9132.91
ECT Product Carousel /wp-admin/admin.php?page=ect_prod8372.0222.8925.93
Add New /wp-admin/admin.php?page=ect_prod_add8332.0324.9230.03

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 19 options in the database
    • ect_prod_sett_land_chg
    • db_upgraded
    • ect_prod_sett_enable_break
    • ect_prod_sett_visible_prod
    • ect_prod_sett_list_prod
    • ect_prod_sett_port_visi
    • widget_recent-posts
    • ect_prod_sett_autoplay
    • ect_prod_sett_tab_chg
    • ect_prod_sett_pauseonhover
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ect_prod
    • > Notice in wp-content/plugins/ect-product-carousel/ect_list.php+2
    Undefined index: msg
    • > GET request to /wp-admin/admin.php?page=ect_prod
    • > Notice in wp-content/plugins/ect-product-carousel/ect_list.php+47
    Undefined index: act

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ect-product-carousel/add_ect_prod.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ect-product-carousel/index.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_sql() in wp-content/plugins/ect-product-carousel/ect_list.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

ect-product-carousel/index.php 92% from 13 tests

This is the main PHP file of "ECT Product Carousel" version 1.9, 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:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ect-product-carousel.php" instead of "index.php")

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
No dangerous file extensions were detected737 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3512360
JavaScript17739300
CSS110177

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions8
▷ Named functions8100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/button-previous.png0.59KB0.49KB▼ 17.08%
img/delete.png0.15KB0.14KB▼ 4.00%
img/ect28x28.png0.63KB0.58KB▼ 7.59%
img/button-next.png0.58KB0.49KB▼ 15.45%