78% multiple-external-product-urls-for-woocommerce

Code Review | Multiple external product URLs for WooCommerce

WordPress plugin Multiple external product URLs for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: multiple-external...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Aug 31, 2018
  • Latest release: Jul 6, 2021
  • Number of updates: 15
  • Update frequency: every 69.4 days
  • Top authors: cmachu (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

900+ active /6,026 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: ▼7.05ms] Passed 4 tests

This is a short check of server-side resources used by Multiple external product URLs for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.19 ▲0.16
Dashboard /wp-admin3.31 ▼0.0445.54 ▼19.25
Posts /wp-admin/edit.php3.36 ▲0.0047.94 ▼4.56
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.15 ▼4.56
Media Library /wp-admin/upload.php3.23 ▲0.0041.31 ▲6.72

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Multiple external product URLs for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲5414.31 ▲0.031.84 ▲0.1957.37 ▲11.42
Dashboard /wp-admin2,195 ▲185.50 ▼0.1787.37 ▼10.1238.85 ▼5.35
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0543.75 ▲4.9634.80 ▼3.74
Add New Post /wp-admin/post-new.php1,535 ▲718.05 ▼5.03630.31 ▼5.9965.00 ▲2.00
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.06101.26 ▼8.2142.17 ▼8.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/multiple-external-product-urls-for-woocommerce/frontend/templates/shop-page-template.php
    • > /wp-content/plugins/multiple-external-product-urls-for-woocommerce/frontend/templates/script-target-blank.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/multiple-external-product-urls-for-woocommerce/includes/class-mepu-woo-activator.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/multiple-external-product-urls-for-woocommerce/admin/templates/woocommerce-external-fields.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/multiple-external-product-urls-for-woocommerce/includes/class-mepu-woo-activator.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/multiple-external-product-urls-for-woocommerce/includes/class-mepu-woo-activator.php on line 13
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/multiple-external-product-urls-for-woocommerce/admin/templates/woocommerce-external-fields.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/multiple-external-product-urls-for-woocommerce/frontend/templates/product-page-template.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

multiple-external-product-urls-for-woocommerce/mepu-woo.php 85% from 13 tests

"Multiple external product URLs for WooCommerce" version 1.3.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("multiple-external-product-urls-for-woocommerce.php" instead of "mepu-woo.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 plugin531 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP1787398443
JavaScript116044
PO File1101244

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity4.70
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1340.62%
▷ Public methods2681.25%
▷ Protected methods00.00%
▷ Private methods618.75%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ 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
There are no PNG files in this plugin