83% product-customizer-light

Code Review | Product Customizer Light

WordPress plugin Product Customizer Light scored83%from 54 tests.

About plugin

  • Plugin page: product-customize...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.3
  • WordPress version: 6.3.1
  • First release: Feb 6, 2018
  • Latest release: Feb 6, 2018
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: k2servicecom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▲2.55ms] Passed 4 tests

This is a short check of server-side resources used by Product Customizer Light
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1247.76 ▲3.90
Dashboard /wp-admin3.42 ▲0.0857.24 ▼5.57
Posts /wp-admin/edit.php3.52 ▲0.1656.93 ▲6.40
Add New Post /wp-admin/post-new.php6.03 ▲0.14110.58 ▲8.11
Media Library /wp-admin/upload.php3.35 ▲0.1242.48 ▲5.47
New Customizer /wp-admin/post-new.php?post_type=k2cl_customizer3.4361.15
All Customizers /wp-admin/edit.php?post_type=k2cl_customizer3.3739.39

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Product Customizer Light
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,947 ▲20114.61 ▲0.238.39 ▲6.6344.00 ▲2.99
Dashboard /wp-admin2,262 ▲595.99 ▼0.07119.13 ▲16.6140.52 ▼2.56
Posts /wp-admin/edit.php2,148 ▲482.77 ▲0.7749.87 ▲9.6537.93 ▲2.81
Add New Post /wp-admin/post-new.php1,560 ▲518.41 ▲0.11630.02 ▼19.6651.29 ▼6.06
Media Library /wp-admin/upload.php1,441 ▲415.30 ▲1.08113.96 ▲6.0047.81 ▼1.00
New Customizer /wp-admin/post-new.php?post_type=k2cl_customizer1,8204.6075.5236.64
All Customizers /wp-admin/edit.php?post_type=k2cl_customizer1,1002.7544.0430.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following items
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'K2CL_Customizer_Public' not found in wp-content/plugins/product-customizer-light/public/partials/form/add_to_cart.php:2
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/product-customizer-light/public/partials/vertical/options/image.php on line 1
    • > PHP Notice
      readfile(): read of 8192 bytes failed with errno=21 Is a directory in wp-content/plugins/product-customizer-light/admin/partials/customizer-admin-export-page.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'K2CL_Customizer_Public' not found in wp-content/plugins/product-customizer-light/public/partials/vertical/image.php:2
    • > PHP Notice
      Undefined index: file_name in wp-content/plugins/product-customizer-light/admin/partials/customizer-admin-export-page.php on line 2
    • > PHP Notice
      Undefined index: dir in wp-content/plugins/product-customizer-light/admin/partials/customizer-admin-export-page.php on line 3
    • > PHP Notice
      Undefined variable: group in wp-content/plugins/product-customizer-light/public/partials/vertical/options/image.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/product-customizer-light/public/partials/vertical/options.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'K2CL_Customizer_Public' not found in wp-content/plugins/product-customizer-light/public/partials/customizer-template-VerticalLeftSidebar.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/product-customizer-light/public/partials/archive/customizer.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: customizer, visual designer, product customizer

product-customizer-light/k2cl_customizer.php 69% from 13 tests

The principal PHP file in "Product Customizer Light" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-customizer-light.php" instead of "k2cl_customizer.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 241 characters long)
  • Domain Path: The domain path folder was not found ("/shop/product-customizer/")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,295 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP214347902,182
CSS613084
JavaScript50020
XML1009

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity35.88
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods103
▷ Static methods3231.07%
▷ Public methods9390.29%
▷ Protected methods00.00%
▷ Private methods109.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/empty_prod.png83.08KB0.26KB▼ 99.68%
public/images/no_image.png0.64KB0.52KB▼ 19.30%
public/images/blank.png0.90KB0.08KB▼ 91.13%
public/partials/images/no_image.png0.64KB0.52KB▼ 19.30%
public/partials/images/empty_prod.png83.08KB0.26KB▼ 99.68%