89% woo-dropdrag-for-upsells-cross-sells

Code Review | WooCommerce Drop/Drag For Upsells Cross-sells

WordPress plugin WooCommerce Drop/Drag For Upsells Cross-sells scored89%from 54 tests.

About plugin

  • Plugin page: woo-dropdrag-for-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.9
  • WordPress version: 6.3.1
  • First release: Jul 6, 2018
  • Latest release: Jul 6, 2018
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: huuhabro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /818 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by WooCommerce Drop/Drag For Upsells Cross-sells
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.12 ▼5.63
Dashboard /wp-admin3.31 ▲0.0045.64 ▼3.07
Posts /wp-admin/edit.php3.36 ▲0.0048.87 ▲5.52
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.27 ▼9.85
Media Library /wp-admin/upload.php3.23 ▲0.0032.74 ▼3.90

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Drop/Drag For Upsells Cross-sells
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.451.73 ▼0.0939.26 ▼4.82
Dashboard /wp-admin2,209 ▲214.85 ▼0.04100.20 ▼15.6938.20 ▼6.56
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0043.84 ▲5.3036.81 ▲0.49
Add New Post /wp-admin/post-new.php1,536 ▲223.27 ▲0.21615.17 ▼48.6754.49 ▼0.93
Media Library /wp-admin/upload.php1,388 ▼04.24 ▲0.0397.18 ▼4.1140.76 ▼1.66

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: product meta, product data, meta

woo-dropdrag-for-upsells-cross-sells/init.php 85% from 13 tests

The primary PHP file in "WooCommerce Drop/Drag For Upsells Cross-sells" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-dropdrag-for-upsells-cross-sells.php" instead of "init.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,446 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33311331,184
PHP25069145
CSS131117

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.16MB with 0.10MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png57.67KB19.41KB▼ 66.35%
1.png102.74KB35.10KB▼ 65.83%