78% wp-shopify

Code Review | WP Shopify

WordPress plugin WP Shopify scored78%from 54 tests.

About plugin

  • Plugin page: wp-shopify
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Apr 16, 2018
  • Latest release: Aug 11, 2023
  • Number of updates: 27
  • Update frequency: every 72.0 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active /33,589 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by WP Shopify
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2446.04 ▲4.67
Dashboard /wp-admin3.41 ▲0.1155.91 ▲6.80
Posts /wp-admin/edit.php3.52 ▲0.1749.19 ▼7.10
Add New Post /wp-admin/post-new.php5.99 ▲0.1187.58 ▼14.55
Media Library /wp-admin/upload.php3.33 ▲0.1138.89 ▲2.46
WP Shopify /wp-admin/options-general.php?page=wp_shopify3.3334.14

Server storage [IO: ▲4.26MB] [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: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Shopify
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.82 ▼0.5610.28 ▲8.6542.54 ▼6.04
Dashboard /wp-admin2,201 ▲275.61 ▲0.0389.60 ▲2.0340.05 ▲0.68
Posts /wp-admin/edit.php2,109 ▲92.01 ▲0.0537.11 ▲1.4934.07 ▼2.83
Add New Post /wp-admin/post-new.php1,532 ▲422.65 ▼0.45663.35 ▼29.3655.59 ▲3.59
Media Library /wp-admin/upload.php1,409 ▲94.14 ▼0.0697.72 ▼16.6448.10 ▲3.93
WP Shopify /wp-admin/options-general.php?page=wp_shopify1,42710.93306.1664.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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
Smoke test failed, please fix the following
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_shopify
    • > Notice in wp-content/plugins/wp-shopify/inc/functions.php+551
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-shopify/inc/graphql.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-shopify/inc/functions.php:38

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

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:
  • Screenshots: These screenshots need descriptions #4, #5 in wp-shopify/assets to your readme.txt
The official readme.txt might help

wp-shopify/index.php 92% from 13 tests

The entry point to "WP Shopify" version 1.4.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-shopify.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin10,582 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,546
PHP423624705
CSS4412198
PO File33030108
JavaScript491225

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/btn.png6.25KB3.96KB▼ 36.69%