83% social-share-like

Code Review | Social Share & Like for WooCommerce

WordPress plugin Social Share & Like for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: social-share-like
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 20, 2021
  • Latest release: Aug 20, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: largbasket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /309 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.25ms] Passed 4 tests

Server-side resources used by Social Share & Like for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.25 ▼3.22
Dashboard /wp-admin3.35 ▲0.0545.25 ▼5.36
Posts /wp-admin/edit.php3.46 ▲0.1149.58 ▲1.06
Add New Post /wp-admin/post-new.php5.95 ▲0.0795.49 ▲2.53
Media Library /wp-admin/upload.php3.27 ▲0.0536.13 ▲3.70

Server storage [IO: ▲0.04MB] [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: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Social Share & Like for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲16213.81 ▼0.414.55 ▲2.7647.47 ▲3.36
Dashboard /wp-admin2,210 ▲254.85 ▼0.05107.35 ▲3.9442.99 ▼0.94
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0439.30 ▲2.0935.63 ▲1.48
Add New Post /wp-admin/post-new.php1,527 ▲718.41 ▼4.63613.77 ▼48.6571.46 ▲16.85
Media Library /wp-admin/upload.php1,386 ▲14.22 ▲0.0692.57 ▼3.3841.18 ▼1.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/social-share-like/public/partials/tfsfl-public-display.php
    • > /wp-content/plugins/social-share-like/admin/partials/tfsfl-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: "wprashed.com"
You can take inspiration from this readme.txt

social-share-like/tfsfl.php 85% from 13 tests

The principal PHP file in "Social Share & Like for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("social-share-like.php" instead of "tfsfl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin186 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12130521180
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected