79% woo-to-facebook-shop

Code Review | Social Commerce for WooCommerce

WordPress plugin Social Commerce for WooCommerce scored 79% from 54 tests.

About plugin

  • Plugin page: woo-to-facebook-shop
  • Plugin version: 2.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-5.4
  • WordPress version: 6.3.1
  • First release: Jun 29, 2017
  • Latest release: Apr 6, 2020
  • Number of updates: 58
  • Update frequency: every 17.5 days
  • Top authors: premiumthemes (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

600+ active / 42,363 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.85ms] Passed 4 tests

Server-side resources used by Social Commerce for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.89 ▼5.32
Dashboard /wp-admin3.31 ▲0.0147.25 ▼1.54
Posts /wp-admin/edit.php3.36 ▲0.0149.36 ▲0.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.89 ▼19.20
Media Library /wp-admin/upload.php3.23 ▲0.0033.12 ▼1.32

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: 1 new table, 9 new options
New tables
wp_wctofb
New WordPress options
theysaidso_admin_options
db_upgraded
wctofb_api
can_compress_scripts
widget_recent-posts
wctofb_pg_version
wctofb_apikey_success
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Social Commerce for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.111.80 ▲0.0240.77 ▼11.54
Dashboard /wp-admin2,206 ▲155.88 ▲0.96105.88 ▲3.7837.98 ▼6.94
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0039.40 ▲5.3635.89 ▲1.48
Add New Post /wp-admin/post-new.php1,533 ▲1423.40 ▼0.12653.58 ▲72.7752.90 ▲1.36
Media Library /wp-admin/upload.php1,382 ▼64.23 ▲0.0598.91 ▼2.8442.20 ▼1.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/woo-to-facebook-shop/uninstall.php+21
    Undefined variable: apisucces
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 23 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #10, #11, #12, #6, #7, #8, #9 in woo-to-facebook-shop/assets to your readme.txt
The official readme.txt is a good inspiration

woo-to-facebook-shop/wctofb.php 77% from 13 tests

The main PHP script in "Social Commerce for WooCommerce" version 2.5.4 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-to-facebook-shop.php" instead of "wctofb.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.3.1" instead of "2.0.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 258 characters long)

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
No dangerous file extensions were detected1,364 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP416511,362
CSS1212

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions2480.00%
▷ Anonymous functions620.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.08MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sync-unsync.png21.05KB2.53KB▼ 87.98%
images/deleted.png19.43KB1.08KB▼ 94.42%
images/sync.png20.32KB1.68KB▼ 91.75%
images/unsync.png20.73KB1.79KB▼ 91.35%