78% socialtoaster-for-woocommerce

Code Review | SocialToaster for WooCommerce

WordPress plugin SocialToaster for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: socialtoaster-for...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2019
  • Latest release: Nov 8, 2019
  • Number of updates: 3
  • Update frequency: every 5.0 days
  • Top authors: tbever (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.58MB] [CPU: ▼16.17ms] Passed 4 tests

This is a short check of server-side resources used by SocialToaster for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1151.42 ▲11.41
Dashboard /wp-admin3.41 ▲0.0745.49 ▼12.95
Posts /wp-admin/edit.php3.53 ▲0.1749.39 ▲4.25
Add New Post /wp-admin/post-new.php3.29 ▼2.6037.01 ▼55.35
Media Library /wp-admin/upload.php3.34 ▲0.1133.04 ▼0.63
SocialToaster /wp-admin/options-general.php?page=socialtoaster3.2831.42

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for SocialToaster for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲14413.61 ▼0.765.99 ▲4.1347.46 ▲7.77
Dashboard /wp-admin2,207 ▲195.84 ▲0.9295.58 ▼10.8638.58 ▼0.76
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0138.28 ▲1.6534.87 ▲1.37
Add New Post /wp-admin/post-new.php1,520 ▼1817.85 ▼5.19599.51 ▲9.1847.18 ▼14.91
Media Library /wp-admin/upload.php1,392 ▲14.22 ▼0.0192.98 ▼3.9542.52 ▼2.24
SocialToaster /wp-admin/options-general.php?page=socialtoaster8872.1823.2428.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=socialtoaster
    • > Notice in wp-content/plugins/socialtoaster-for-woocommerce/socialtoaster.php+225
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/socialtoaster-for-woocommerce/socialtoaster.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
  • Requires php: Invalid plugin version format
The official readme.txt might help

socialtoaster-for-woocommerce/socialtoaster.php 92% from 13 tests

The entry point to "SocialToaster for WooCommerce" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("socialtoaster-for-woocommerce.php" instead of "socialtoaster.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
No dangerous file extensions were detected558 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP111828519
JavaScript11020
CSS15019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions3088.24%
▷ Anonymous functions411.76%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin