78% onex-custom-woo-builder

Code Review | Onex Custom Woo Builder

WordPress plugin Onex Custom Woo Builder scored78%from 54 tests.

About plugin

  • Plugin page: onex-custom-woo-b...
  • 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: Sep 3, 2019
  • Latest release: Sep 3, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: onex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /684 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.58ms] Passed 4 tests

Analyzing server-side resources used by Onex Custom Woo Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.93 ▼3.15
Dashboard /wp-admin3.32 ▲0.0255.86 ▲2.87
Posts /wp-admin/edit.php3.44 ▲0.0852.45 ▲1.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.96 ▼8.51
Media Library /wp-admin/upload.php3.25 ▲0.0236.76 ▼4.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 249 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Onex Custom Woo Builder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.26 ▼0.011.59 ▲0.0143.53 ▼3.86
Dashboard /wp-admin2,234 ▲545.67 ▲0.0493.89 ▼1.0543.15 ▼3.84
Posts /wp-admin/edit.php2,136 ▲362.12 ▲0.1142.20 ▲2.9637.34 ▲1.75
Add New Post /wp-admin/post-new.php1,560 ▲3218.19 ▼4.70619.83 ▼45.4864.27 ▲9.31
Media Library /wp-admin/upload.php1,436 ▲334.21 ▲0.00100.15 ▼14.9645.65 ▼3.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/onex-custom-woo-builder/templates/custom-woo-products-list/global/loop-end.php
    • > /wp-content/plugins/onex-custom-woo-builder/templates/custom-woo-categories/global/loop-end.php
    • > /wp-content/plugins/onex-custom-woo-builder/templates/custom-woo-products/global/loop-end.php
  • 72× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Custom_Woo_Builder_Shortcode_Base' not found in wp-content/plugins/onex-custom-woo-builder/includes/shortcodes/custom-woo-categories-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/onex-custom-woo-builder/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/onex-custom-woo-builder/templates/custom-woo-products-list/global/item-compare.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function custom_woo_builder_template_functions() in wp-content/plugins/onex-custom-woo-builder/templates/custom-woo-products/global/item-categories.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function woocommerce_upsell_display() in wp-content/plugins/onex-custom-woo-builder/templates/custom-single-upsells/global/index.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/onex-custom-woo-builder/templates/custom-single-tabs/global/index.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/onex-custom-woo-builder/templates/custom-woo-products/global/item-button.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Custom_Woo_Builder_Shortcode_Base' not found in wp-content/plugins/onex-custom-woo-builder/includes/shortcodes/custom-woo-products-list-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/onex-custom-woo-builder/templates/custom-woo-products-list/global/item-quick-view.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/onex-custom-woo-builder/templates/custom-woo-products/global/presets/preset-1.php:8

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

onex-custom-woo-builder/custom-woo-builder.php 92% from 13 tests

The primary PHP file in "Onex Custom Woo Builder" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("onex-custom-woo-builder.php" instead of "custom-woo-builder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin28,942 lines of code in 223 files:
LanguageFilesBlank linesComment linesLines of code
PHP1714,6531,72524,660
JavaScript84131542,229
Sass1818002,024
JSON200020
CSS6009

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
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 Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/templates/single/layout-8/thumbnail.png13.59KB5.36KB▼ 60.58%
includes/templates/single/layout-1/thumbnail.png17.20KB7.50KB▼ 56.39%
includes/templates/single/layout-7/thumbnail.png13.58KB4.70KB▼ 65.43%
includes/templates/single/layout-2/thumbnail.png14.38KB6.41KB▼ 55.41%
includes/templates/category/layout-2/thumbnail.png20.62KB7.58KB▼ 63.25%