68% wizshop

Code Review | WizShop

WordPress plugin WizShop scored68%from 54 tests.

About plugin

  • Plugin page: wizshop
  • Plugin version: 3.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 15, 2016
  • Latest release: Jun 9, 2022
  • Number of updates: 115
  • Update frequency: every 18.7 days
  • Top authors: hashshop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,326 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.18MB] [CPU: ▲15.35ms] Passed 4 tests

Server-side resources used by WizShop
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.58 ▲1.1260.77 ▲12.67
Dashboard /wp-admin4.56 ▲1.2672.21 ▲20.12
Posts /wp-admin/edit.php4.61 ▲1.2671.92 ▲22.16
Add New Post /wp-admin/post-new.php7.06 ▲1.18103.71 ▲6.45
Media Library /wp-admin/upload.php4.41 ▲1.1860.40 ▲22.62
Hebrew Categories /wp-admin/edit-tags.php?taxonomy=wizshop_categories_he&post_type=wizshop4.5159.79
Settings /wp-admin/edit.php?post_type=wizshop&page=wizshop_settings4.5275.44
Media /wp-admin/edit.php?post_type=wizshop&page=wizshop_media_settings4.4456.17

Server storage [IO: ▲0.90MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 123 new files
Database: no new tables, 25 new options
New WordPress options
wizshop_media_settings
wizshop_settings
wizshop_plugin_settings
wizshop_customers_settings_he
theysaidso_admin_options
wizshop_cat_settings_en
widget_wizshop-product-search
wizshop_image_settings
wizshop_customers_settings_en
wizshop_cat_settings_he
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WizShop
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,993 ▲24715.01 ▲0.822.07 ▲0.2739.35 ▼7.64
Dashboard /wp-admin2,387 ▲1996.56 ▲1.68127.62 ▲20.5639.32 ▼2.65
Posts /wp-admin/edit.php2,293 ▲2013.46 ▲1.4452.68 ▲15.5134.97 ▼3.13
Add New Post /wp-admin/post-new.php1,559 ▲2318.48 ▼2.78620.37 ▼77.1036.51 ▼25.67
Media Library /wp-admin/upload.php1,469 ▲784.38 ▲0.1488.06 ▼17.1942.06 ▼6.66
Hebrew Categories /wp-admin/edit-tags.php?taxonomy=wizshop_categories_he&post_type=wizshop1,6363.3149.0036.67
Settings /wp-admin/edit.php?post_type=wizshop&page=wizshop_settings2,1633.5848.0228.20
Media /wp-admin/edit.php?post_type=wizshop&page=wizshop_media_settings1,2083.1642.7269.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wizshop/functions.php+441
    Undefined variable: old_keys
  • Zombie WordPress options detected upon uninstall: 15 options
    • can_compress_scripts
    • widget_wizshop-product-search
    • widget_wizshop-newsletters
    • widget_wizshop-products-list
    • wizshop_notices
    • widget_recent-comments
    • widget_wizshop-sign-in
    • theysaidso_admin_options
    • widget_wizshop-cart
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wizshop/include/checkout-final.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wizshop/wiz_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wizshop_get_view_options() in wp-content/plugins/wizshop/admin/tabs.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wizshop/default/default.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WizShop_Widget' not found in wp-content/plugins/wizshop/shop_widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wizshop_get_view_options() in wp-content/plugins/wizshop/admin/media-lib.php:4

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 94% from 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
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

wizshop/plugin.php 92% from 13 tests

The primary PHP file in "WizShop" version 3.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wizshop.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin15,009 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
PHP757836708,634
CSS83701684,178
JavaScript10176721,244
PO File2431599932
SVG210021

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity35.29
▷ Minimum class complexity1.00
▷ Maximum class complexity119.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods204
▷ Static methods8943.63%
▷ Public methods20098.04%
▷ Protected methods41.96%
▷ Private methods00.00%
Functions124
▷ Named functions11995.97%
▷ Anonymous functions54.03%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/cart.png3.10KB0.54KB▼ 82.52%