83% connect-shopify-and-woocommerce

Code Review | Shopify Connect for WooCommerce

WordPress plugin Shopify Connect for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: connect-shopify-a...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7
  • WordPress version: 6.3.1
  • First release: Aug 21, 2016
  • Latest release: Aug 29, 2016
  • Number of updates: 7
  • Update frequency: every 15.6 days
  • Top authors: nickhamze (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /9,314 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.47ms] Passed 4 tests

This is a short check of server-side resources used by Shopify Connect for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.77 ▼7.55
Dashboard /wp-admin3.31 ▲0.0055.44 ▲5.89
Posts /wp-admin/edit.php3.36 ▲0.0050.42 ▼5.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.43 ▼10.80
Media Library /wp-admin/upload.php3.23 ▲0.0036.66 ▲1.53

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Shopify Connect for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.54 ▲0.181.95 ▲0.3339.58 ▼1.12
Dashboard /wp-admin2,195 ▲155.62 ▲0.0886.17 ▼15.0144.11 ▲3.43
Posts /wp-admin/edit.php2,079 ▼242.01 ▲0.0334.36 ▼3.7433.70 ▲1.45
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▲0.00693.07 ▲77.1757.18 ▼6.28
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.01100.37 ▼10.0243.76 ▼2.19

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/connect-shopify-and-woocommerce/inc/front-end.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/connect-shopify-and-woocommerce/shopify-connect.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/connect-shopify-and-woocommerce/inc/wc-hooks.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === connect-shopify-and-woocommerce === )
You can take inspiration from this readme.txt

connect-shopify-and-woocommerce/shopify-connect.php 85% from 13 tests

The main file in "Shopify Connect for WooCommerce" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("connect-shopify-and-woocommerce.php" instead of "shopify-connect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin410 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP46533324
JavaScript27363
CSS16023

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin