89% instashop

Code Review | SocialShop

WordPress plugin SocialShop scored89%from 54 tests.

About plugin

  • Plugin page: instashop
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Oct 25, 2017
  • Latest release: Oct 19, 2021
  • Number of updates: 30
  • Update frequency: every 48.5 days
  • Top authors: sjregan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /12,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼6.08ms] Passed 4 tests

A check of server-side resources used by SocialShop
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.56 ▲2.95
Dashboard /wp-admin3.49 ▲0.1552.99 ▼11.53
Posts /wp-admin/edit.php3.61 ▲0.2550.02 ▲1.28
Add New Post /wp-admin/post-new.php6.08 ▲0.1982.46 ▼17.01
Media Library /wp-admin/upload.php3.42 ▲0.1939.26 ▲4.51
SocialShop /wp-admin/options-general.php?page=socialshop_settings3.3841.56

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 9 new options
New WordPress options
widget_instashop-gallery
db_upgraded
socialshop_version
widget_recent-comments
widget_socialshop-gallery
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for SocialShop
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.69 ▲0.481.67 ▲0.0944.28 ▲3.33
Dashboard /wp-admin2,215 ▲415.53 ▼0.0382.73 ▼2.7138.66 ▼0.72
Posts /wp-admin/edit.php2,123 ▲232.10 ▲0.0834.11 ▲1.3930.95 ▼5.74
Add New Post /wp-admin/post-new.php1,544 ▲1623.19 ▲0.09664.89 ▼29.8964.25 ▲5.52
Media Library /wp-admin/upload.php1,423 ▲234.18 ▲0.0498.75 ▲0.2042.95 ▲1.60
SocialShop /wp-admin/options-general.php?page=socialshop_settings9031.9922.0229.13

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_socialshop-gallery
    • widget_instashop-gallery
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: social media, socialshop, embed instagram, shopping, product gallery...

instashop/socialshop.php 85% from 13 tests

Analyzing the main PHP file in "SocialShop" version 2.1.0
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("instashop.php" instead of "socialshop.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
Everything looks great! No dangerous files found in this plugin2,030 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON2001,204
PHP8223410686
JavaScript31831128
CSS13012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity23.00
▷ Minimum class complexity3.00
▷ Maximum class complexity46.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods45
▷ Static methods511.11%
▷ Public methods4395.56%
▷ Protected methods00.00%
▷ Private methods24.44%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.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
No PNG images were found in this plugin