89% social-notifications-for-woocommerce

Code Review | Social Notifications for WooCommerce

WordPress plugin Social Notifications for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: social-notificati...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1
  • WordPress version: 6.3.1
  • First release: Jul 27, 2021
  • Latest release: Dec 22, 2022
  • Number of updates: 7
  • Update frequency: every 73.4 days
  • Top authors: skillsup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,590 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.17MB] [CPU: ▼14.67ms] Passed 4 tests

A check of server-side resources used by Social Notifications for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.59 ▼0.82
Dashboard /wp-admin3.20 ▼0.1031.95 ▼17.52
Posts /wp-admin/edit.php3.26 ▼0.0936.97 ▼12.52
Add New Post /wp-admin/post-new.php5.44 ▼0.4575.15 ▼22.90
Media Library /wp-admin/upload.php3.20 ▼0.0229.57 ▼5.72

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Social Notifications for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.43 ▼0.001.72 ▼0.0344.69 ▼5.91
Dashboard /wp-admin2,209 ▲215.79 ▼0.1098.13 ▼10.1541.71 ▼2.39
Posts /wp-admin/edit.php2,097 ▲82.05 ▲0.0638.95 ▼1.1634.55 ▼1.85
Add New Post /wp-admin/post-new.php1,539 ▲123.49 ▲0.15653.43 ▼35.8553.47 ▲6.49
Media Library /wp-admin/upload.php1,397 ▲94.25 ▲0.0196.32 ▼10.4642.92 ▼2.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

social-notifications-for-woocommerce/social-notifications-for-woocommerce.php 92% from 13 tests

Analyzing the main PHP file in "Social Notifications for WooCommerce" version 1.1.2
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin41,475 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP211,1359,12641,475

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 4,379)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 502)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity676.62
▷ Minimum class complexity1.00
▷ Maximum class complexity4,379.00
Average method complexity11.20
▷ Minimum method complexity1.00
▷ Maximum method complexity502.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods530
▷ Static methods11321.32%
▷ Public methods40275.85%
▷ Protected methods12723.96%
▷ Private methods10.19%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants68
▷ Global constants6798.53%
▷ Class constants11.47%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin