78% woosignal-woocommerce-app

Code Review | WooSignal WooCommerce App

WordPress plugin WooSignal WooCommerce App scored78%from 54 tests.

About plugin

  • Plugin page: woosignal-woocomm...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.1
  • WordPress version: 6.3.1
  • First release: May 28, 2019
  • Latest release: Oct 2, 2021
  • Number of updates: 10
  • Update frequency: every 85.8 days
  • Top authors: woosignal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Server-side resources used by WooSignal WooCommerce App
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.66 ▼6.61
Dashboard /wp-admin3.32 ▲0.0151.44 ▼5.64
Posts /wp-admin/edit.php3.37 ▲0.0153.09 ▲2.23
Add New Post /wp-admin/post-new.php5.92 ▲0.03101.88 ▲7.30
Media Library /wp-admin/upload.php3.24 ▲0.0143.98 ▲9.35

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WooSignal WooCommerce App
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13013.40 ▼0.959.17 ▲7.3944.84 ▲2.97
Dashboard /wp-admin2,202 ▲255.64 ▼0.0387.05 ▼6.2373.73 ▲31.12
Posts /wp-admin/edit.php2,125 ▲251.99 ▼0.0542.95 ▲5.9237.51 ▲1.98
Add New Post /wp-admin/post-new.php1,696 ▲16322.19 ▼0.98710.07 ▲52.8960.25 ▼4.63
Media Library /wp-admin/upload.php1,416 ▲194.10 ▼0.14100.43 ▼3.4175.24 ▲28.78

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woosignal-woocommerce-app/public/partials/woosignal-woocommerce-app-public-display.php
    • > /wp-content/plugins/woosignal-woocommerce-app/admin/partials/woosignal-woocommerce-app-admin-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woosignal-woocommerce-app/public/partials/app-template.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woosignal-woocommerce-app/public/partials/home.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/woosignal-woocommerce-app/public/partials/premium.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

woosignal-woocommerce-app/woosignal-woocommerce-app.php 92% from 13 tests

The primary PHP file in "WooSignal WooCommerce App" version 2.0.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected432 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP15155570302
CSS2164124
JavaScript24546

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.43
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 1.28MB with 0.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/woosignal_logo_stripe_blue.png33.13KB8.33KB▼ 74.84%
public/images/woosignal_labelstore_main_banner_android.png721.37KB48.14KB▼ 93.33%
public/images/woocommerce_logo.png55.53KB28.71KB▼ 48.30%
public/images/powered_by_stripe.png1.33KB1.64KB0.00%
public/images/label_pro_iphone_x.png191.46KB58.64KB▼ 69.37%