77% custom-woo-builder-for-elementor

Code Review | Custom Builder for Elementor and WooCommerce

WordPress plugin Custom Builder for Elementor and WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: custom-woo-builde...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 16, 2019
  • Latest release: Dec 3, 2019
  • Number of updates: 10
  • Update frequency: every 6.5 days
  • Top authors: onex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,305 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼9.31ms] Passed 4 tests

An overview of server-side resources used by Custom Builder for Elementor and WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1740.87 ▲0.59
Dashboard /wp-admin3.48 ▲0.1346.52 ▼16.15
Posts /wp-admin/edit.php3.59 ▲0.2347.22 ▲1.32
Add New Post /wp-admin/post-new.php6.06 ▲0.1790.71 ▼4.88
Media Library /wp-admin/upload.php3.40 ▲0.1736.09 ▼16.80

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 268 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Custom Builder for Elementor and WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.16 ▼1.151.89 ▲0.0442.83 ▼0.40
Dashboard /wp-admin2,243 ▲514.86 ▼0.19108.80 ▲0.3738.90 ▲0.29
Posts /wp-admin/edit.php2,125 ▲331.99 ▼0.0441.69 ▲0.1036.26 ▲1.89
Add New Post /wp-admin/post-new.php1,560 ▲1823.51 ▲5.13633.60 ▼19.9856.91 ▼4.88
Media Library /wp-admin/upload.php1,428 ▲404.26 ▲0.0699.00 ▲5.7442.11 ▼1.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-categories/global/loop-end.php
    • > /wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-products/global/loop-end.php
    • > /wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-products-list/global/loop-end.php
  • 72× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-products/global/presets/preset-10.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function custom_woo_builder_tools() in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-categories/global/loop-item.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function custom_woo_builder_template_functions() in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-products/global/item-content.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function custom_woo_builder_template_functions() in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-products/global/item-title.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function comments_template() in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-single-reviews-form/global/index.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woocommerce_template_single_excerpt() in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-single-excerpt/global/index.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-products-list/global/loop-start.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-products/global/presets/preset-6.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/custom-woo-builder-for-elementor/templates/cutsom-single-rating/global/index.php:6
    • > PHP Notice
      Trying to get property 'name' of non-object in wp-content/plugins/custom-woo-builder-for-elementor/templates/custom-woo-categories/global/item-title.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

custom-woo-builder-for-elementor/custom-woo-builder.php 85% from 13 tests

"Custom Builder for Elementor and WooCommerce" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-woo-builder-for-elementor.php" instead of "custom-woo-builder.php")
  • Description: The description should be shorter than 140 characters (currently 157 characters long)

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
There were no executable files found in this plugin28,952 lines of code in 223 files:
LanguageFilesBlank linesComment linesLines of code
PHP1714,6551,73124,670
JavaScript84131542,229
Sass1818002,024
JSON200020
CSS6009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity11.56
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes88
▷ Abstract classes33.41%
▷ Concrete classes8596.59%
▷ Final classes00.00%
Methods796
▷ Static methods384.77%
▷ Public methods64981.53%
▷ Protected methods13216.58%
▷ Private methods151.88%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
40 PNG files occupy 0.64MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/thumbnail17.png15.44KB5.68KB▼ 63.24%
includes/templates/single/layout-8/thumbnail.png13.59KB5.36KB▼ 60.58%
includes/templates/archive/layout-3/thumbnail.png12.43KB4.72KB▼ 61.99%
includes/templates/single/layout-1/thumbnail.png17.20KB7.50KB▼ 56.39%
includes/templates/shop/layout-3/thumbnail.png15.98KB5.95KB▼ 62.77%