84% smart-shopify-product

Code Review | Smart Shopify Product

WordPress plugin Smart Shopify Product scored 84% from 54 tests.

About plugin

  • Plugin page: smart-shopify-pro...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0+
  • WordPress version: 6.3.1
  • First release: Jul 5, 2017
  • Latest release: Nov 11, 2018
  • Number of updates: 14
  • Update frequency: every 35.4 days
  • Top authors: yulioaj290 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 2,190 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.92ms] Passed 4 tests

This is a short check of server-side resources used by Smart Shopify Product
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.19 ▼3.51
Dashboard /wp-admin3.40 ▲0.1045.28 ▲0.84
Posts /wp-admin/edit.php3.45 ▲0.0951.48 ▲1.59
Add New Post /wp-admin/post-new.php6.00 ▲0.1185.83 ▼16.23
Media Library /wp-admin/upload.php3.32 ▲0.0937.90 ▼0.78

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Smart Shopify Product
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲20514.29 ▼0.3611.30 ▲9.6339.84 ▼2.52
Dashboard /wp-admin2,236 ▲455.13 ▲0.21100.56 ▲2.1738.88 ▼5.51
Posts /wp-admin/edit.php2,119 ▲302.60 ▲0.5536.62 ▼5.0832.77 ▼3.44
Add New Post /wp-admin/post-new.php1,541 ▲423.44 ▲0.22628.01 ▼21.6547.66 ▼14.24
Media Library /wp-admin/upload.php1,415 ▲274.47 ▲0.2099.15 ▼15.4742.73 ▼5.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-shopify-product/ajax-functions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-shopify-product/shortcodes.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-shopify-product/admin-page.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-shopify-product/smart-shopify-product.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tested up to: Version format is invalid
The official readme.txt is a good inspiration

smart-shopify-product/smart-shopify-product.php 92% from 13 tests

The principal PHP file in "Smart Shopify Product" v. 1.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,884 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4258154760
CSS21173569
PHP4143100452
Markdown1270103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.28MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png45.87KB14.83KB▼ 67.67%
assets/icon-128x128.png14.04KB5.60KB▼ 60.14%
assets/banner-772x250.png45.87KB14.83KB▼ 67.67%
assets/screenshot-3.png58.69KB24.59KB▼ 58.11%
assets/icon-256x256.png28.43KB10.44KB▼ 63.27%