73% woocustomizer

Code Review | StoreCustomizer - A plugin to Customize all WooCommerce Pages

WordPress plugin StoreCustomizer - A plugin to Customize all WooCommerce Pages scored73%from 54 tests.

About plugin

  • Plugin page: woocustomizer
  • Plugin version: 2.5.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 4, 2019
  • Latest release: Sep 12, 2023
  • Number of updates: 56
  • Update frequency: every 25.7 days
  • Top authors: Kaira (100%)

Code review

54 tests

User reviews

120 reviews

Install metrics

30,000+ active /790,881 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.54MB] [CPU: ▲24.74ms] 75% from 4 tests

This is a short check of server-side resources used by StoreCustomizer - A plugin to Customize all WooCommerce Pages
Please take the time to fix the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.54MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.20 ▲5.7477.10 ▲31.78
Dashboard /wp-admin9.22 ▲5.8875.91 ▲18.36
Posts /wp-admin/edit.php9.22 ▲5.8784.62 ▲37.09
Add New Post /wp-admin/post-new.php10.55 ▲4.67117.23 ▲14.79
Media Library /wp-admin/upload.php9.22 ▲5.9969.91 ▲34.04
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius9.2266.01

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 231 new files
Database: no new tables, 9 new options
New WordPress options
fs_debug_mode
fs_active_plugins
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
fs_accounts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for StoreCustomizer - A plugin to Customize all WooCommerce Pages
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲7614.69 ▲0.341.92 ▲0.3431.53 ▼12.36
Dashboard /wp-admin2,218 ▲435.56 ▼0.1184.95 ▼14.7842.03 ▼1.14
Posts /wp-admin/edit.php2,127 ▲272.10 ▲0.0940.21 ▲3.5037.98 ▲6.07
Add New Post /wp-admin/post-new.php1,537 ▲922.84 ▼0.50684.45 ▲25.9650.73 ▼8.01
Media Library /wp-admin/upload.php1,420 ▲174.23 ▲0.03100.59 ▲4.9046.76 ▲6.17
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0851.6624.0729.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/woocustomizer/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • fs_active_plugins
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_accounts
    • db_upgraded
    • can_compress_scripts
    • fs_debug_mode
    • widget_recent-posts

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
Even though everything seems fine, this is not 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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocustomizer/includes/customizer/styles.php:1520
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocustomizer/includes/customizer/customizer-library/extensions/style-builder.php:267
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woocustomizer/woocustomizer.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocustomizer/includes/customizer/customizer-options.php:2739
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woocustomizer/includes/inc/woocommerce.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocustomizer/includes/customizer/customizer-library/extensions/interface.php:152

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: online store, customize woocommerce, ecommerce, woocommerce, woocommerce addons

woocustomizer/woocustomizer.php 92% from 13 tests

The main PHP script in "StoreCustomizer - A plugin to Customize all WooCommerce Pages" version 2.5.4 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 173 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected50,892 lines of code in 166 files:
LanguageFilesBlank linesComment linesLines of code
PHP1308,75118,42339,979
PO File52,7013,4167,248
CSS1859371,814
JavaScript111391481,552
Markdown1920283
XML13016

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity87.70
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
Methods1,309
▷ Static methods20315.51%
▷ Public methods91469.82%
▷ Protected methods171.30%
▷ Private methods37828.88%
Functions194
▷ Named functions19399.48%
▷ Anonymous functions10.52%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/upload-icon.png2.60KB1.19KB▼ 54.12%
assets/images/woocustomizer-logo.png9.93KB4.53KB▼ 54.34%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/woocustomizer.png16.95KB17.88KB0.00%
assets/images/close-icon.png1.30KB0.44KB▼ 66.09%