84% storybook-shopify-blog-connector

Code Review | StoryBook - Shopify Blog Connector

WordPress plugin StoryBook - Shopify Blog Connector scored84%from 54 tests.

About plugin

  • Plugin page: storybook-shopify...
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: May 8, 2019
  • Latest release: Dec 13, 2021
  • Number of updates: 21
  • Update frequency: every 45.5 days
  • Top authors: eblocks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,000 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.67MB] [CPU: ▼19.30ms] Passed 4 tests

An overview of server-side resources used by StoryBook - Shopify Blog Connector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.02 ▼5.81
Dashboard /wp-admin3.32 ▲0.0251.00 ▼1.53
Posts /wp-admin/edit.php3.38 ▲0.0241.67 ▼11.28
Add New Post /wp-admin/post-new.php3.15 ▼2.7336.39 ▼58.58
Media Library /wp-admin/upload.php3.25 ▲0.0238.32 ▲1.03

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by StoryBook - Shopify Blog Connector
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3214.23 ▼0.362.07 ▲0.2043.09 ▼0.18
Dashboard /wp-admin2,195 ▲155.60 ▼0.1181.72 ▼7.5675.76 ▲28.92
Posts /wp-admin/edit.php2,112 ▲122.01 ▼0.0135.56 ▼0.8234.45 ▼2.29
Add New Post /wp-admin/post-new.php1,548 ▲323.38 ▲0.30758.39 ▲73.9949.32 ▼2.78
Media Library /wp-admin/upload.php1,409 ▲94.25 ▲0.03114.26 ▼0.8775.31 ▲26.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/storybook-shopify-blog-connector/co/eblocks/core/sidebars/widgets/stb_advertisement.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/storybook-shopify-blog-connector/co/eblocks/core/sidebars/widgets/stb_w_popular_posts.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/storybook-shopify-blog-connector/co/eblocks/core/sidebars/widgets/stb_w_blog_categories.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/storybook-shopify-blog-connector/co/eblocks/core/sidebars/widgets/stb_w_blog_tags.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/storybook-shopify-blog-connector/co/eblocks/core/sidebars/widgets/stb_w_recent_posts.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: shopify blog, wordpress to shopify, shopify, ecommerce

storybook-shopify-blog-connector/story-book-connector.php 92% from 13 tests

Analyzing the main PHP file in "StoryBook - Shopify Blog Connector" version 1.1
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("storybook-shopify-blog-connector.php" instead of "story-book-connector.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,359 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP21184401,312
JavaScript15032
CSS10015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.37
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods79
▷ Static methods1924.05%
▷ Public methods6379.75%
▷ Protected methods22.53%
▷ Private methods1417.72%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
co/eblocks/assets/img/wp-admin-icon.png3.35KB0.74KB▼ 77.96%