84% wc-products-to-external-websites

Code Review | Link Products to External websites for WooCommerce

WordPress plugin Link Products to External websites for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: wc-products-to-ex...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 2, 2022
  • Latest release: Aug 4, 2022
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: momothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Link Products to External websites for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.88 ▼1.00
Dashboard /wp-admin3.32 ▲0.0255.87 ▲4.65
Posts /wp-admin/edit.php3.37 ▲0.0146.79 ▼2.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.99 ▼6.38
Media Library /wp-admin/upload.php3.24 ▲0.0135.93 ▼0.92

Server storage [IO: ▲2.56MB] [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: 28 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Link Products to External websites for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.25 ▼0.481.90 ▲0.2145.60 ▲5.30
Dashboard /wp-admin2,204 ▲245.57 ▼0.1192.06 ▲4.9746.22 ▲1.38
Posts /wp-admin/edit.php2,107 ▲71.96 ▼0.0240.75 ▲2.0733.00 ▼2.95
Add New Post /wp-admin/post-new.php1,532 ▲622.93 ▼0.16651.25 ▼16.2255.59 ▼8.43
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.0797.07 ▼7.1243.52 ▼5.61

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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-products-to-external-websites/includes/admin/pages/page-momo-wcext-category-script.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-products-to-external-websites/includes/admin/class-momo-wcext-admin-init.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-products-to-external-websites/includes/admin/pages/page-momo-wcext-product-script.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-products-to-external-websites/class-momo-wcexternal.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-products-to-external-websites/includes/admin/pages/momo-wcext-settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wc-products-to-external-websites/includes/admin/pages/page-momo-wcext-settings.php:11

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 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
3 plugin tags: woocommerce, iframe, wordpress

wc-products-to-external-websites/class-momo-wcexternal.php 85% from 13 tests

The entry point to "Link Products to External websites for WooCommerce" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-products-to-external-websites.php" instead of "class-momo-wcexternal.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin9,159 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS696176,204
SVG1001,626
PHP12402541,070
JavaScript3827259

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity13.83
▷ Minimum class complexity3.00
▷ Maximum class complexity25.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods35
▷ Static methods00.00%
▷ Public methods35100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin