84% personalize-woocommerce-cart-page

Code Review | GoHero Store Customizer for WooCommerce

WordPress plugin GoHero Store Customizer for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: personalize-wooco...
  • Plugin version: 3.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2014
  • Latest release: Jan 11, 2023
  • Number of updates: 49
  • Update frequency: every 62.6 days
  • Top authors: nmedia (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /52,600 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▲10.51ms] Passed 4 tests

An overview of server-side resources used by GoHero Store Customizer for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2348.95 ▲5.46
Dashboard /wp-admin3.51 ▲0.2165.73 ▲17.65
Posts /wp-admin/edit.php3.62 ▲0.2764.34 ▲11.41
Add New Post /wp-admin/post-new.php6.09 ▲0.20110.31 ▲8.66
Media Library /wp-admin/upload.php3.43 ▲0.2053.10 ▲16.49
WooHero /wp-admin/admin.php?page=wooh_settings3.4453.24

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 87 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for GoHero Store Customizer for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.38 ▼0.9612.45 ▲10.7441.19 ▲3.53
Dashboard /wp-admin2,192 ▲155.64 ▲0.0388.78 ▼2.0137.11 ▼4.47
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0134.40 ▼1.2030.12 ▼4.79
Add New Post /wp-admin/post-new.php1,526 ▼223.21 ▲0.13678.27 ▲35.4163.28 ▲7.18
Media Library /wp-admin/upload.php1,400 ▼04.10 ▼0.05113.63 ▲6.7346.67 ▲1.01
WooHero /wp-admin/admin.php?page=wooh_settings1,8042.3140.0332.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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/personalize-woocommerce-cart-page/templates/get-pro.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wooh_admin_settings_array() in wp-content/plugins/personalize-woocommerce-cart-page/templates/admin/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/personalize-woocommerce-cart-page/templates/get-ppom.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: personalized woocommerce, woocommerce customizer, add to cart label, enquiry form, customize product page...

personalize-woocommerce-cart-page/woohero.php 85% from 13 tests

Analyzing the main PHP file in "GoHero Store Customizer for WooCommerce" version 3.5
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.9" instead of "3.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("personalize-woocommerce-cart-page.php" instead of "woohero.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin15,187 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
SVG4035,435
CSS760383,962
Sass1434341,768
LESS1434441,758
PHP113971111,147
JavaScript93543121,117

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.85
Average class complexity75.00
▷ Minimum class complexity2.00
▷ Maximum class complexity137.00
Average method complexity8.16
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods31
▷ Static methods39.68%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
8 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png1.39KB1.21KB▼ 13.45%
images/minus.png3.32KB0.62KB▼ 81.33%
images/delete_16.png3.30KB0.54KB▼ 83.61%
images/down_16.png3.21KB0.51KB▼ 84.10%
images/plus.png3.37KB0.66KB▼ 80.54%