73% custom-product-builder-for-woocommerce

Code Review | Custom Product Builder - Designer and Order Customized

WordPress plugin Custom Product Builder - Designer and Order Customized scored73%from 54 tests.

About plugin

  • Plugin page: custom-product-bu...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2022
  • Latest release: Jul 21, 2023
  • Number of updates: 29
  • Update frequency: every 18.2 days
  • Top authors: coderpress (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,288 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.01MB] [CPU: ▲22.13ms] 75% from 4 tests

This is a short check of server-side resources used by Custom Product Builder - Designer and Order Customized
Please fix the following
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.01MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.92 ▲5.4678.06 ▲34.41
Dashboard /wp-admin8.94 ▲5.6477.68 ▲17.18
Posts /wp-admin/edit.php8.94 ▲5.5882.35 ▲24.96
Add New Post /wp-admin/post-new.php9.24 ▲3.35114.82 ▲11.95
Media Library /wp-admin/upload.php8.94 ▲5.7175.20 ▲35.36
Custom Product Builder For WooCommerce /wp-admin/admin.php?page=custom-product-builder-for-woocommerce8.9472.59
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9477.05

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 203 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
fs_debug_mode
widget_recent-posts
fs_accounts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
fs_active_plugins

Browser metrics Passed 4 tests

Checking browser requirements for Custom Product Builder - Designer and Order Customized
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.38 ▼0.181.83 ▼0.1633.55 ▼5.63
Dashboard /wp-admin2,219 ▲425.65 ▼0.0295.17 ▼5.6747.26 ▲1.14
Posts /wp-admin/edit.php2,131 ▲282.12 ▲0.1245.49 ▲1.0538.50 ▼0.89
Add New Post /wp-admin/post-new.php1,540 ▲1421.93 ▼1.72688.11 ▲26.2351.16 ▼7.26
Media Library /wp-admin/upload.php1,424 ▲244.12 ▼0.13104.58 ▼8.2247.86 ▲3.88
Custom Product Builder For WooCommerce /wp-admin/admin.php?page=custom-product-builder-for-woocommerce9591.8628.8073.78
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0721.6629.4931.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/custom-product-builder-for-woocommerce/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • fs_active_plugins
    • fs_debug_mode
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_accounts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CustomProductBuilderWC\\add_action() in wp-content/plugins/custom-product-builder-for-woocommerce/includes/class-product.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CustomProductBuilderWC\\add_filter() in wp-content/plugins/custom-product-builder-for-woocommerce/includes/class-order.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function CustomProductBuilderWC\\add_action() in wp-content/plugins/custom-product-builder-for-woocommerce/includes/class-admin.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: You can take inspiration from this readme.txt

custom-product-builder-for-woocommerce/custom-product-builder-for-wc.php 92% from 13 tests

Analyzing the main PHP file in "Custom Product Builder - Designer and Order Customized" version 1.0.5
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-product-builder-for-woocommerce.php" instead of "custom-product-builder-for-wc.php")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin34,682 lines of code in 156 files:
LanguageFilesBlank linesComment linesLines of code
PHP1288,17517,58034,100
Markdown2890268
JavaScript73469198
SVG32274
JSON10027
CSS150015

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity83.46
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.51
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes59.62%
Methods1,296
▷ Static methods20515.82%
▷ Public methods90769.98%
▷ Protected methods171.31%
▷ Private methods37228.70%
Functions109
▷ Named functions109100.00%
▷ Anonymous functions00.00%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/custom-product-builder-for-woocommerce.png3.15KB2.85KB▼ 9.48%