10% wpshopify

Code Review | ShopWP

WordPress plugin ShopWP scored10%from 54 tests.

About plugin

  • Plugin page: wpshopify
  • Plugin version: 5.1.10
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3.2
  • WordPress version: 6.3.1
  • First release: May 13, 2018
  • Latest release: Oct 31, 2023
  • Number of updates: 269
  • Update frequency: every 7.4 days
  • Top authors: andrewmrobbins (100%)

Code review

54 tests

User reviews

62 reviews

Install metrics

2,000+ active /316,377 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲3.79MB] [CPU: ▲23.39ms] Passed 4 tests

Server-side resources used by ShopWP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.39 ▲3.9374.60 ▲34.40
Dashboard /wp-admin7.03 ▲3.7368.15 ▲20.80
Posts /wp-admin/edit.php7.15 ▲3.8068.80 ▲13.18
Add New Post /wp-admin/post-new.php9.87 ▲3.99125.50 ▲30.22
Media Library /wp-admin/upload.php6.95 ▲3.7263.86 ▲29.35
Extensions /wp-admin/admin.php?page=wps-extensions7.1062.29
Sync /wp-admin/admin.php?page=wps-tools7.1066.50
Info /wp-admin/admin.php?page=wps-help7.1062.51
Wizard /wp-admin/admin.php?page=shopwp-wizard7.0661.67
Visual Builder /wp-admin/admin.php?page=wps-visual-builder7.1059.67
License /wp-admin/admin.php?page=wps-license7.1063.55
Connect /wp-admin/admin.php?page=wps-connect7.1061.28
Settings /wp-admin/admin.php?page=wps-settings7.1065.52
Products /wp-admin/edit.php?post_type=wps_products7.2667.95

Server storage [IO: ▲8.56MB] [DB: ▲0.03MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification found: 1 file (3.82KB) outside of "wp-content/plugins/wpshopify/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/shopwp-compatibility.php
Filesystem: 1,040 new files
Database: 12 new tables, 19 new options
New tables
wp_wps_options
wp_wps_collects
wp_wps_variants
wp_wps_collections_smart
wp_wps_settings_connection
wp_wps_settings_license
wp_wps_images
wp_wps_settings_syncing
wp_wps_tags
wp_wps_products
...
New WordPress options
shopwp_table_exists_wp_wps_options
widget_recent-posts
db_upgraded
shopwp_table_exists_wp_wps_variants
widget_theysaidso_widget
shopwp_table_exists_wp_wps_settings_connection
shopwp_table_exists_wp_wps_settings_general
widget_recent-comments
shopwp_should_flush_rewrite_rules
shopwp_table_exists_wp_wps_collections_custom
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for ShopWP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲18915.41 ▲0.9151.96 ▲50.1241.41 ▼0.69
Dashboard /wp-admin2,261 ▲815.63 ▼0.0792.46 ▼1.7238.71 ▼1.70
Posts /wp-admin/edit.php2,170 ▲651.99 ▲0.0137.65 ▼4.4132.42 ▼4.94
Add New Post /wp-admin/post-new.php1,577 ▲5117.91 ▼5.71623.55 ▼41.4580.18 ▲24.72
Media Library /wp-admin/upload.php1,466 ▲664.23 ▲0.0897.45 ▼11.6042.50 ▼3.50
Extensions /wp-admin/admin.php?page=wps-extensions1,51115.44350.4196.72
Sync /wp-admin/admin.php?page=wps-tools1,43915.39214.3842.34
Info /wp-admin/admin.php?page=wps-help1,45514.94207.3842.53
Wizard /wp-admin/admin.php?page=shopwp-wizard93411.16133.1620.37
Visual Builder /wp-admin/admin.php?page=wps-visual-builder1,36014.86211.0159.61
License /wp-admin/admin.php?page=wps-license1,36515.21211.2640.62
Connect /wp-admin/admin.php?page=wps-connect1,36614.90207.0143.91
Settings /wp-admin/admin.php?page=wps-settings1,46415.05195.7243.99
Products /wp-admin/edit.php?post_type=wps_products1,54013.86170.0931.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/wpshopify/classes/filesystem/class-filesystem.php+120
    unlink(wp-content/mu-plugins/shopwp-compatibility.php): No such file or directory
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 0% 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
  • 15× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/collections-all.php
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/cart.php
    • > /wp-content/plugins/wpshopify/public/templates/components/storefront/storefront.php
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/reviews.php
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/products-single.php
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/product-title.php
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/products-all.php
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/product-pricing.php
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/product.php
    • > /wp-content/plugins/wpshopify/public/templates/components/skeletons/storefront.php
  • 38× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ShopWP\\Factories\\Render\\Root_Factory' not found in wp-content/plugins/wpshopify/public/templates/components/wrapper/wrapper-client.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopWP\\Vendor\\DeepCopy\\TypeFilter\\TypeFilter' not found in wp-content/plugins/wpshopify/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/Spl/ArrayObjectFilter.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopWP\\Vendor\\DeepCopy\\Filter\\Filter' not found in wp-content/plugins/wpshopify/vendor/myclabs/deep-copy/src/DeepCopy/Filter/Doctrine/DoctrineProxyFilter.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopWP\\Vendor\\DeepCopy\\Filter\\Filter' not found in wp-content/plugins/wpshopify/vendor/myclabs/deep-copy/src/DeepCopy/Filter/ReplaceFilter.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopWP\\Vendor\\DeepCopy\\Matcher\\Matcher' not found in wp-content/plugins/wpshopify/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyTypeMatcher.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\TransformerInterface' not found in wp-content/plugins/wpshopify/vendor/typisttech/imposter/src/Transformer.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopWP\\Vendor\\DeepCopy\\TypeFilter\\TypeFilter' not found in wp-content/plugins/wpshopify/vendor/myclabs/deep-copy/src/DeepCopy/TypeFilter/ShallowCopyFilter.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'ShopWP\\Vendor\\DeepCopy\\Matcher\\Matcher' not found in wp-content/plugins/wpshopify/vendor/myclabs/deep-copy/src/DeepCopy/Matcher/PropertyNameMatcher.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'ShopWP\\Factories\\CPT_Model_Factory' not found in wp-content/plugins/wpshopify/public/templates/webhooks/products/product-create.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ShopWP\\Factories\\DB\\Products_Factory' not found in wp-content/plugins/wpshopify/public/templates/webhooks/products/product-delete.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: store, shopify, purchase, ecommerce, shop...

wpshopify/shopwp.php 77% from 13 tests

The entry point to "ShopWP" version 5.1.10 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.4" instead of "5.6")
  • Main file name: Name the main plugin file the same as the plugin slug ("wpshopify.php" instead of "shopwp.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
No dangerous file extensions were detected47,756 lines of code in 811 files:
LanguageFilesBlank linesComment linesLines of code
PHP3146,9722,98824,994
SVG2801318,804
PO File91,2511,7732,718
Markdown33090585
JSON4130476
JavaScript16007158
CSS461821

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.39
▷ Minimum class complexity1.00
▷ Maximum class complexity123.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces77
Interfaces9
Traits0
Classes267
▷ Abstract classes20.75%
▷ Concrete classes26599.25%
▷ Final classes10.38%
Methods1,542
▷ Static methods28118.22%
▷ Public methods1,46394.88%
▷ Protected methods503.24%
▷ Private methods291.88%
Functions74
▷ Named functions45.41%
▷ Anonymous functions7094.59%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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
admin/css/vendor/chosen-sprite.png0.53KB0.88KB0.00%
assets/icon-128x128.png2.56KB1.40KB▼ 45.15%
assets/default-avatar.png0.81KB0.42KB▼ 48.43%
admin/imgs/extensions/elementor/banner.png15.54KB10.16KB▼ 34.64%
public/imgs/placeholder.png2.93KB2.09KB▼ 28.56%