83% x-extensions-for-woocommerce

Code Review | X-Extensions for WooCommerce

WordPress plugin X-Extensions for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: x-extensions-for-...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Jun 5, 2021
  • Latest release: Mar 11, 2023
  • Number of updates: 5
  • Update frequency: every 128.8 days
  • Top authors: rejuancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 321 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼0.79ms] Passed 4 tests

This is a short check of server-side resources used by X-Extensions for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.68 ▲0.80
Dashboard /wp-admin3.42 ▲0.1245.61 ▼9.79
Posts /wp-admin/edit.php3.54 ▲0.1849.68 ▲2.49
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.81 ▲7.33
Media Library /wp-admin/upload.php3.35 ▲0.1235.75 ▲3.36

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
vendor_type
wp_user_role_selector
widget_theysaidso_widget
widget_recent-comments
db_upgraded
wp_xewc_is_used
xewc_show_description

Browser metrics Passed 4 tests

Checking browser requirements for X-Extensions for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲11813.20 ▼1.091.65 ▼0.0943.16 ▼0.88
Dashboard /wp-admin2,262 ▲744.90 ▼0.1999.15 ▼14.6179.62 ▲32.59
Posts /wp-admin/edit.php2,148 ▲592.00 ▼0.0138.43 ▲2.3235.61 ▲0.25
Add New Post /wp-admin/post-new.php1,565 ▲3023.26 ▼0.04739.30 ▲55.2848.39 ▼3.86
Media Library /wp-admin/upload.php1,444 ▲654.30 ▲0.1397.68 ▼3.8471.77 ▲27.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_theysaidso_widget
    • wp_user_role_selector
    • vendor_type
    • wp_xewc_is_used
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • xewc_show_description

Smoke tests 75% 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 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/x-extensions-for-woocommerce/extensions/product-search/pages/shortcode.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/x-extensions-for-woocommerce/settings/view/Addons.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/x-extensions-for-woocommerce/extensions/product-listing/pages/shortcode.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (22 tag instead of maximum 10)
The official readme.txt is a good inspiration

x-extensions-for-woocommerce/x-extensions.php 85% from 13 tests

"X-Extensions for WooCommerce" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("x-extensions-for-woocommerce.php" instead of "x-extensions.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,323 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP272964191,742
Sass261229
JavaScript74151204
CSS3115148

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.35
Average class complexity15.92
▷ Minimum class complexity2.00
▷ Maximum class complexity55.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods93
▷ Static methods88.60%
▷ Public methods93100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants19100.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 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
extensions/quickview/assets/images/thumbnail.png2.55KB1.56KB▼ 38.99%
extensions/product-search/assets/images/thumbnail.png3.95KB2.16KB▼ 45.34%
assets/images/woocommerce-icon.png7.05KB3.41KB▼ 51.68%
extensions/product-listing/assets/images/thumbnail.png0.79KB0.60KB▼ 23.49%