90% wc-external-product-new-tab

Code Review | WooCommerce External Product New Tab

WordPress plugin WooCommerce External Product New Tab scored90%from 54 tests.

About plugin

  • Plugin page: wc-external-produ...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: Feb 20, 2023
  • Number of updates: 17
  • Update frequency: every 136.8 days
  • Top authors: stuartduff (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

5,000+ active /31,067 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
Installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.03ms] Passed 4 tests

An overview of server-side resources used by WooCommerce External Product New Tab
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.40 ▼6.55
Dashboard /wp-admin3.31 ▼0.0345.06 ▼14.59
Posts /wp-admin/edit.php3.36 ▲0.0148.74 ▲5.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0180.31 ▼3.85
Media Library /wp-admin/upload.php3.23 ▲0.0137.02 ▲0.88

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
wc-external-product-new-tab-version
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce External Product New Tab
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲7014.73 ▲0.441.94 ▼0.1040.77 ▼2.74
Dashboard /wp-admin2,219 ▲315.83 ▲0.95106.10 ▼11.3941.72 ▼1.95
Posts /wp-admin/edit.php2,107 ▲182.01 ▼0.0040.34 ▲3.9237.65 ▲3.84
Add New Post /wp-admin/post-new.php1,532 ▲923.05 ▲0.19647.22 ▼22.8956.74 ▼4.89
Media Library /wp-admin/upload.php1,401 ▲134.23 ▲0.0699.37 ▼9.1843.01 ▼0.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • wc-external-product-new-tab-version
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
The SRP test was a success

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)
Everything seems fine, but this is not an exhaustive test

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
9 plugin tags: shop, sales, checkout, cart, ecommerce...

wc-external-product-new-tab/wc-external-product-new-tab.php Passed 13 tests

Analyzing the main PHP file in "WooCommerce External Product New Tab" version 1.0.4
119 characters long description:
This plugin sets all external / affiliate product buy now links on a WooCommerce site to open in a new web browser tab.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected75 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13011775

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin