78% ect-homepage-products

Code Review | ECT Home Page Products

WordPress plugin ECT Home Page Products scored78%from 54 tests.

About plugin

  • Plugin page: ect-homepage-prod...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 7, 2014
  • Latest release: Aug 31, 2019
  • Number of updates: 36
  • Update frequency: every 55.6 days
  • Top authors: etemplates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /6,341 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.12ms] Passed 4 tests

An overview of server-side resources used by ECT Home Page Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0647.45 ▲1.36
Dashboard /wp-admin3.37 ▲0.0653.53 ▼6.02
Posts /wp-admin/edit.php3.42 ▲0.0653.20 ▲0.14
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.64 ▼11.94
Media Library /wp-admin/upload.php3.29 ▲0.0640.08 ▲1.51
ECT Homepage Product /wp-admin/admin.php?page=ect_homepage_prod3.2734.35
Add New /wp-admin/admin.php?page=ect_homepage_prod_add3.2634.41

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 19 new options
New WordPress options
ect_prod_sett_animated_speed
ect_prod_sett_land_visi
widget_recent-comments
ect_prod_sett_visible_prod
ect_prod_sett_autoPlaySpeed
ect_prod_sett_land_chg
ect_prod_sett_pauseonhover
ect_prod_sett_tab_visi
can_compress_scripts
ect_prod_sett_autoplay
...

Browser metrics Passed 4 tests

An overview of browser requirements for ECT Home Page Products
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲12613.51 ▼0.777.30 ▲5.5839.42 ▼7.54
Dashboard /wp-admin2,212 ▲325.69 ▲0.1088.26 ▼10.8364.98 ▲22.05
Posts /wp-admin/edit.php2,131 ▲312.29 ▲0.3347.28 ▲11.2335.84 ▼2.47
Add New Post /wp-admin/post-new.php1,695 ▲15822.30 ▲4.26604.31 ▼61.0728.87 ▼35.68
Media Library /wp-admin/upload.php1,421 ▲214.26 ▼0.11100.95 ▼3.6183.06 ▲34.53
ECT Homepage Product /wp-admin/admin.php?page=ect_homepage_prod8681.8537.6430.33
Add New /wp-admin/admin.php?page=ect_homepage_prod_add9951.8126.8533.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 19 options in the database
    • ect_prod_sett_tab_chg
    • ect_prod_sett_pauseonhover
    • theysaidso_admin_options
    • can_compress_scripts
    • ect_prod_sett_enable_break
    • ect_prod_sett_autoplay
    • db_upgraded
    • ect_prod_sett_animated_speed
    • widget_recent-comments
    • ect_prod_sett_land_visi
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ect-homepage-products/add_hprod.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/ect-homepage-products/edit_hprod.php:34
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/ect-homepage-products/ect_list.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ect-homepage-products/index.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% 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:
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt is a good inspiration

ect-homepage-products/index.php 92% from 13 tests

The main PHP file in "ECT Home Page Products" ver. 1.9 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ect-homepage-products.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin713 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44528647
CSS15146
JavaScript19020

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.59
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%
Functions10
▷ Named functions10100.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
9 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/add-to-cart-btn.png4.28KB2.23KB▼ 47.98%
img/tick.png0.30KB0.19KB▼ 35.83%
img/ect28x28.png0.63KB0.58KB▼ 7.59%
img/cross.png0.39KB0.27KB▼ 32.01%
img/button-next.png0.58KB0.49KB▼ 15.45%