84% woocommerce-crowdstream

Code Review | WooCommerce Crowdstream Integration

WordPress plugin WooCommerce Crowdstream Integration scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-crowd...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4.3
  • WordPress version: 6.3.1
  • First release: Mar 12, 2016
  • Latest release: Mar 13, 2016
  • Number of updates: 4
  • Update frequency: every 80.3 days
  • Top authors: alex.phayes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /527 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.01MB] [CPU: ▼4.73ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Crowdstream Integration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.77 ▼6.17
Dashboard /wp-admin3.32 ▲0.0252.78 ▼2.31
Posts /wp-admin/edit.php3.37 ▲0.0150.75 ▲0.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.32 ▼11.11
Media Library /wp-admin/upload.php3.24 ▲0.0137.75 ▲0.67

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Crowdstream Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.27 ▼0.081.69 ▼0.1744.31 ▲0.39
Dashboard /wp-admin2,204 ▲305.62 ▲0.0182.29 ▼10.8940.39 ▼2.30
Posts /wp-admin/edit.php2,106 ▲31.97 ▼0.0439.82 ▲1.9737.04 ▲2.74
Add New Post /wp-admin/post-new.php1,537 ▲1122.97 ▼0.07653.99 ▼43.1557.43 ▲3.34
Media Library /wp-admin/upload.php1,406 ▲64.16 ▲0.01114.57 ▲11.4949.10 ▲4.83

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-crowdstream/includes/views/js.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-crowdstream/includes/views/snippet.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/woocommerce-crowdstream/includes/views/identify.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: crowdstream, woocommerce, analytics

woocommerce-crowdstream/woocommerce-crowdstream.php 85% from 13 tests

The main PHP file in "WooCommerce Crowdstream Integration" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin439 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP572102372
JavaScript15547
JSON10020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity23.50
▷ Minimum class complexity5.00
▷ Maximum class complexity42.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods2890.32%
▷ Protected methods00.00%
▷ Private methods39.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
PNG images were not found in this plugin