67% wp-store-lite

Code Review | wpStore

WordPress plugin wpStore scored67%from 54 tests.

About plugin

  • Plugin page: wp-store-lite
  • Plugin version: 2.9.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 6.3.1
  • First release: Sep 12, 2019
  • Latest release: Sep 8, 2020
  • Number of updates: 7
  • Update frequency: every 56.6 days
  • Top authors: yanalexandrov (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,132 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.52MB] [CPU: ▼4.30ms] Passed 4 tests

An overview of server-side resources used by wpStore
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5128.17 ▼14.78
Dashboard /wp-admin5.81 ▲2.5171.21 ▲19.95
Posts /wp-admin/edit.php5.64 ▲2.2962.24 ▲10.71
Add New Post /wp-admin/post-new.php5.67 ▼0.2262.50 ▼33.06
Media Library /wp-admin/upload.php5.72 ▲2.4965.73 ▲28.70
Add product /wp-admin/post-new.php?post_type=product5.6763.06
Marketplace /wp-admin/admin.php?page=wpsl-addons5.6961.32
Categories /wp-admin/edit-tags.php?taxonomy=product_cat&post_type=product5.7658.57
Tags /wp-admin/edit-tags.php?taxonomy=product_tag&post_type=product5.7566.47
Coupons /wp-admin/edit.php?post_type=shop_coupon5.6549.81
New order /wp-admin/post-new.php?post_type=shop_order5.6756.38
All orders /wp-admin/edit.php?post_type=shop_order5.6550.87
Import /wp-admin/admin.php?page=wpsl-import5.6952.50
Statuses /wp-admin/edit-tags.php?taxonomy=wpsl_status&post_type=shop_order5.7682.77
wpStore /wp-admin/admin.php?page=wpsl_options5.8363.94

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 175 new files
Database: 1 new table, 11 new options
New tables
wp_wpsl_attributes
New WordPress options
wpsl_option
widget_wpsl_product_filter
widget_recent-posts
db_upgraded
widget_wpsl_category
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_wpsl_paymeint_icons
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for wpStore
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,048 ▲29114.13 ▼0.168.08 ▲5.9637.44 ▼13.12
Dashboard /wp-admin2,350 ▲1595.47 ▲0.56114.49 ▲15.1642.15 ▲1.82
Posts /wp-admin/edit.php2,424 ▲3353.58 ▲1.5469.35 ▲30.3975.55 ▲44.56
Add New Post /wp-admin/post-new.php1,638 ▲11923.29 ▲0.38661.04 ▲15.1634.40 ▼22.42
Media Library /wp-admin/upload.php1,535 ▲1474.67 ▲0.4793.65 ▼15.6941.06 ▼5.87
Add product /wp-admin/post-new.php?post_type=product7,01119.96843.8646.92
Marketplace /wp-admin/admin.php?page=wpsl-addons1,0242.2130.5632.74
Categories /wp-admin/edit-tags.php?taxonomy=product_cat&post_type=product1,6413.6449.0570.29
Tags /wp-admin/edit-tags.php?taxonomy=product_tag&post_type=product1,6163.6145.0075.86
Coupons /wp-admin/edit.php?post_type=shop_coupon1,3673.8368.9830.46
New order /wp-admin/post-new.php?post_type=shop_order2,0353.2458.7244.57
All orders /wp-admin/edit.php?post_type=shop_order1,3903.8150.4527.77
Import /wp-admin/admin.php?page=wpsl-import9292.1732.6228.51
Statuses /wp-admin/edit-tags.php?taxonomy=wpsl_status&post_type=shop_order1,8512.3833.7334.54
wpStore /wp-admin/admin.php?page=wpsl_options4,7717.81173.92161.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wpsl_attributes
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • widget_recent-comments
    • widget_wpsl_smart_search
    • widget_wpsl_product_filter
    • can_compress_scripts
    • widget_wpsl_paymeint_icons
    • theysaidso_admin_options
    • widget_recent-posts
    • wpsl_option
    • widget_theysaidso_widget
    • widget_wpsl_category
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=shop_order
    • > Notice in wp-content/plugins/wp-store-lite/core/class-wpsl-constructor-metaboxes.php+214
    Undefined index: product_wpnonce
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=shop_order
    • > Notice in wp-content/plugins/wp-store-lite/core/class-wpsl-constructor-metaboxes.php+214
    Undefined index: shipping_wpnonce
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=shop_order
    • > Notice in wp-content/plugins/wp-store-lite/core/class-wpsl-constructor-metaboxes.php+214
    Undefined index: order_wpnonce
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=shop_order
    • > Notice in wp-content/plugins/wp-store-lite/core/class-wpsl-constructor-metaboxes.php+214
    Undefined index: coupons_wpnonce
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpsl_options
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'WPSL_Thumb' does not have a method 'add_scripts'
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=shop_order
    • > Notice in wp-content/plugins/wp-store-lite/admin/wpsl-permalinks.php+313
    Undefined index: attachment

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-store-lite/core/theme-support/twentyseventeen.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-store-lite/core/theme-support/twentysixteen.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WPSL_Cart' not found in wp-content/plugins/wp-store-lite/core/class-wpsl-wishlist.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-store-lite/wp-store.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpautop() in wp-content/plugins/wp-store-lite/templates/single/product-tabs.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-store-lite/core/theme-support/twentytwelve.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-store-lite/core/theme-support/twentyfifteen.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-store-lite/core/theme-support/twentynineteen.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-store-lite/core/class-wpsl-include-js-css.php:5

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 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

wp-store-lite/wp-store.php 77% from 13 tests

The primary PHP file in "wpStore" version 2.9.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-store-lite.php" instead of "wp-store.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.0" instead of "7.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin28,398 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
PHP1171,9553,83615,285
CSS6961526,125
PO File21,8922,5114,296
JavaScript6691611,451
SVG32051,215
Markdown110026

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity27.07
▷ Minimum class complexity1.00
▷ Maximum class complexity111.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes00.00%
Methods228
▷ Static methods177.46%
▷ Public methods22498.25%
▷ Protected methods10.44%
▷ Private methods31.32%
Functions220
▷ Named functions21497.27%
▷ Anonymous functions62.73%
Constants29
▷ Global constants931.03%
▷ Class constants2068.97%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/no-products.png20.43KB21.10KB0.00%
addons/img/open-book.png10.66KB5.97KB▼ 44.06%
addons/img/notification.png8.08KB4.41KB▼ 45.38%
addons/img/quality.png9.58KB6.33KB▼ 33.87%
assets/img/no-photo.png3.05KB3.37KB0.00%