68% facebook-shop-by-storeyacom

Code Review | Social Shop for WooCommerce

WordPress plugin Social Shop for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: facebook-shop-by-...
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Jul 23, 2013
  • Latest release: Jul 11, 2021
  • Number of updates: 876
  • Update frequency: every 3.3 days
  • Top authors: storeya (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

2,000+ active /97,326 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼32.81ms] Passed 4 tests

Analyzing server-side resources used by Social Shop for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.86 ▼3.84
Dashboard /wp-admin3.00 ▼0.3020.65 ▼28.11
Posts /wp-admin/edit.php3.00 ▼0.3523.58 ▼23.91
Add New Post /wp-admin/post-new.php3.00 ▼2.8819.43 ▼67.22
Media Library /wp-admin/upload.php3.00 ▼0.2321.67 ▼11.98
StoreYa Social Shop for WooCommerce /wp-admin/options-general.php?page=facebook-shop-by-storeyacom3.0021.80

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social Shop for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.26 ▼1.121.61 ▼0.1637.80 ▼8.64
Dashboard /wp-admin2,210 ▲195.08 ▲0.18114.67 ▲11.4141.63 ▼2.75
Posts /wp-admin/edit.php2,093 ▲41.97 ▼0.0935.16 ▼1.1233.93 ▲0.96
Add New Post /wp-admin/post-new.php1,540 ▲723.35 ▲0.02646.18 ▼16.7053.50 ▼0.04
Media Library /wp-admin/upload.php1,392 ▲74.20 ▼0.0492.93 ▼8.4140.99 ▼4.99
StoreYa Social Shop for WooCommerce /wp-admin/options-general.php?page=facebook-shop-by-storeyacom7822.0328.5429.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/facebook-shop-by-storeyacom/woocommerce-storeya-admin.php+185
    Undefined variable: ws_domain
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=facebook-shop-by-storeyacom
    • > Notice in wp-content/plugins/facebook-shop-by-storeyacom/woocommerce-storeya-admin.php+185
    Undefined variable: ws_domain
    • > GET request to /wp-admin/options-general.php?page=facebook-shop-by-storeyacom
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=facebook-shop-by-storeyacom
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/facebook-shop-by-storeyacom/woocommerce-storeya-frontend.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/facebook-shop-by-storeyacom/woocommerce-storeya.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/facebook-shop-by-storeyacom/woocommerce-storeya-admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/facebook-shop-by-storeyacom/woocommerce-storeya-common.php:11

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: You are using too many tags: 34 tag instead of maximum 10
You can take inspiration from this readme.txt

facebook-shop-by-storeyacom/woocommerce-storeya.php 85% from 13 tests

The principal PHP file in "Social Shop for WooCommerce" v. 2.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 345 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("facebook-shop-by-storeyacom.php" instead of "woocommerce-storeya.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected395 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP419815395

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity25.33
▷ Minimum class complexity12.00
▷ Maximum class complexity50.00
Average method complexity5.29
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1583.33%
▷ Protected methods00.00%
▷ Private methods316.67%
Functions0
▷ Named functions00.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
There are no PNG files in this plugin