83% ecwid-widgets-avalanche

Code Review | Widgets Avalanche for Ecwid

WordPress plugin Widgets Avalanche for Ecwid scored83%from 54 tests.

About plugin

  • Plugin page: ecwid-widgets-ava...
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Jan 10, 2015
  • Latest release: Dec 1, 2015
  • Number of updates: 61
  • Update frequency: every 5.3 days
  • Top authors: scofennell@gmail.com (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /5,300 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.51MB] [CPU: ▲145.63ms] Passed 4 tests

A check of server-side resources used by Widgets Avalanche for Ecwid
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.36 ▼0.1124.04 ▼18.22
Dashboard /wp-admin4.07 ▲0.76249.79 ▲201.39
Posts /wp-admin/edit.php4.12 ▲0.76259.74 ▲211.83
Add New Post /wp-admin/post-new.php6.60 ▲0.71285.70 ▲187.51
Media Library /wp-admin/upload.php3.93 ▲0.69249.13 ▲214.70

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 12 new options
New WordPress options
db_upgraded
widget_sjf_et_sortable
widget_recent-posts
widget_sjf_et_accordion
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_sjf_et_autosuggest
widget_sjf_et_rss
widget_sjf_et_popup
...

Browser metrics Passed 4 tests

Checking browser requirements for Widgets Avalanche for Ecwid
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,922 ▲18713.59 ▼0.718.91 ▲6.8847.73 ▼2.19
Dashboard /wp-admin2,245 ▲574.86 ▼0.25108.16 ▲3.2344.67 ▲3.08
Posts /wp-admin/edit.php2,125 ▲362.02 ▼0.0138.61 ▼2.3731.03 ▼3.81
Add New Post /wp-admin/post-new.php1,547 ▲1423.14 ▲0.25693.98 ▲96.0761.17 ▲6.78
Media Library /wp-admin/upload.php1,418 ▲274.24 ▲0.0696.95 ▲4.1044.45 ▲3.31

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 12 options in the database
    • db_upgraded
    • widget_sjf_et_autosuggest
    • widget_sjf_et_slider
    • widget_recent-posts
    • can_compress_scripts
    • widget_sjf_et_accordion
    • widget_sjf_et_popup
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_sjf_et_sortable
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'SJF_ET_ADMIN_PATHsettings.php' (include_path='.:/usr/share/php') in wp-content/plugins/ecwid-widgets-avalanche/admin/admin.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecwid-widgets-avalanche/admin/enqueue.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecwid-widgets-avalanche/inc/widgets/autosuggest.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecwid-widgets-avalanche/admin/notices.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecwid-widgets-avalanche/inc/widgets/slider.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecwid-widgets-avalanche/inc/widgets/rss.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecwid-widgets-avalanche/admin/settings.php:16
    • > PHP Warning
      Use of undefined constant SJF_ET_ADMIN_PATH - assumed 'SJF_ET_ADMIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ecwid-widgets-avalanche/admin/admin.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecwid-widgets-avalanche/inc/enqueue.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ecwid-widgets-avalanche/inc/feed.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

ecwid-widgets-avalanche/ecwid_widgets_avalanche.php 85% from 13 tests

The entry point to "Widgets Avalanche for Ecwid" version 1.6.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ecwid-widgets-avalanche.php" instead of "ecwid_widgets_avalanche.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin3,696 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP251,5951,8562,983
CSS273100310
JavaScript3234297299
Markdown1550104

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity14.65
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes00.00%
Methods202
▷ Static methods5326.24%
▷ Public methods19797.52%
▷ Protected methods00.00%
▷ Private methods52.48%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.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