10% link-products-to-sendinblue

Code Review | Link Products To Sendinblue Lists From Woocommerce

WordPress plugin Link Products To Sendinblue Lists From Woocommerce scored10%from 54 tests.

About plugin

  • Plugin page: link-products-to-...
  • Plugin version: 1.1.5
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 11, 2021
  • Latest release: May 25, 2023
  • Number of updates: 25
  • Update frequency: every 34.5 days
  • Top authors: mzeahmed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,612 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User error in wp-content/plugins/link-products-to-sendinblue/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16.

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

This is a short check of server-side resources used by Link Products To Sendinblue Lists From Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.34 ▼4.62
Dashboard /wp-admin3.31 ▼0.0444.05 ▼12.67
Posts /wp-admin/edit.php3.36 ▲0.0047.09 ▲2.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.56 ▲5.50
Media Library /wp-admin/upload.php3.23 ▲0.0035.78 ▲0.44

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,159 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Link Products To Sendinblue Lists From Woocommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.20 ▼1.182.13 ▲0.0844.81 ▼3.48
Dashboard /wp-admin2,206 ▲184.87 ▼0.02113.33 ▼4.3040.36 ▼2.10
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0139.27 ▼1.5836.34 ▲1.77
Add New Post /wp-admin/post-new.php1,519 ▲223.26 ▲5.66653.15 ▼3.4955.25 ▼3.78
Media Library /wp-admin/upload.php1,382 ▼64.20 ▲0.0197.03 ▲1.0341.95 ▼2.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 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 0% from 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
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/link-products-to-sendinblue/templates/admin/options/partials/form-fields.php
    • > /wp-content/plugins/link-products-to-sendinblue/vendor/nikic/php-parser/grammar/rebuildParsers.php
  • 631× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Scalar\\MagicConst' not found in wp-content/plugins/link-products-to-sendinblue/vendor/nikic/php-parser/lib/PhpParser/Node/Scalar/MagicConst/Trait_.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Runner\\Filter\\GroupFilterIterator' not found in wp-content/plugins/link-products-to-sendinblue/vendor/phpunit/phpunit/src/Runner/Filter/IncludeGroupFilterIterator.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr\\Cast' not found in wp-content/plugins/link-products-to-sendinblue/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Array_.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'SebastianBergmann\\CodeCoverage\\Exception' not found in wp-content/plugins/link-products-to-sendinblue/vendor/phpunit/php-code-coverage/src/Exception/ReflectionException.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPUnit\\Framework\\MockObject\\Stub\\Stub' not found in wp-content/plugins/link-products-to-sendinblue/vendor/phpunit/phpunit/src/Framework/MockObject/Stub/ReturnSelf.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPUnit\\Exception' not found in wp-content/plugins/link-products-to-sendinblue/vendor/phpunit/phpunit/src/Util/InvalidDataSetException.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Util\\Printer' not found in wp-content/plugins/link-products-to-sendinblue/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Expr' not found in wp-content/plugins/link-products-to-sendinblue/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ClassConstFetch.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpParser\\Parser' not found in wp-content/plugins/link-products-to-sendinblue/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'PhpParser\ode\\Stmt' not found in wp-content/plugins/link-products-to-sendinblue/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/While_.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: sendinblue, woocommerce

link-products-to-sendinblue/link-products-to-sendinblue.php Passed 13 tests

The primary PHP file in "Link Products To Sendinblue Lists From Woocommerce" version 1.1.5 is used by WordPress to initiate all plugin functionality
99 characters long description:
Link WooCommerce products to a specific Brevo (ex Sendinblue) list to add the customer to that list

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected73,434 lines of code in 1,076 files:
LanguageFilesBlank linesComment linesLines of code
PHP94913,41523,78263,893
JSON32703,225
Markdown571,60402,671
yacc3336122,050
XSD300964
XML1110153
CSS63612147
PO File13640121
YAML223189
JavaScript8172788
reStructuredText2231831
SVG2002

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 142)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.68
▷ Minimum class complexity1.00
▷ Maximum class complexity216.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity142.00
Code structure
Namespaces100
Interfaces72
Traits4
Classes847
▷ Abstract classes435.08%
▷ Concrete classes80494.92%
▷ Final classes44355.10%
Methods4,455
▷ Static methods4159.32%
▷ Public methods3,44277.26%
▷ Protected methods49911.20%
▷ Private methods51411.54%
Functions1,485
▷ Named functions23115.56%
▷ Anonymous functions1,25484.44%
Constants544
▷ Global constants91.65%
▷ Class constants53598.35%
▷ Public constants48891.21%

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
No PNG files were detected