84% woocom-add-multiple-products

Code Review | WooCom Add Multiple Products

WordPress plugin WooCom Add Multiple Products scored84%from 54 tests.

About plugin

  • Plugin page: woocom-add-multip...
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.8
  • WordPress version: 6.3.1
  • First release: Aug 19, 2015
  • Latest release: Oct 7, 2017
  • Number of updates: 19
  • Update frequency: every 41.1 days
  • Top authors: rnaby (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /8,420 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

Server-side resources used by WooCom Add Multiple Products
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.06 ▼7.72
Dashboard /wp-admin3.31 ▲0.0044.88 ▼13.79
Posts /wp-admin/edit.php3.36 ▲0.0047.36 ▲0.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.19 ▼8.55
Media Library /wp-admin/upload.php3.23 ▲0.0032.63 ▼0.83

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCom Add Multiple Products
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.064.06 ▲2.2537.29 ▼7.53
Dashboard /wp-admin2,209 ▲185.90 ▼0.04110.47 ▼2.5041.96 ▼4.81
Posts /wp-admin/edit.php2,086 ▼02.02 ▼0.0434.76 ▼2.8630.80 ▼1.97
Add New Post /wp-admin/post-new.php1,519 ▼1423.17 ▲0.06655.16 ▼4.9350.01 ▼5.54
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0497.88 ▲4.1242.39 ▼0.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TheDramatist\\WooComAddMultipleProducts\\register_activation_hook() in wp-content/plugins/woocom-add-multiple-products/woocom-add-multiple-products.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocom-add-multiple-products/src/Frontend/Views/html-input-field.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocom-add-multiple-products/src/Widget/Views/html-public-view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocom-add-multiple-products/src/Widget/Views/html-admin-view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woocom-add-multiple-products/src/Settings/Views/html-admin-form.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/woocom-add-multiple-products/src/Widget/Widget.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woocom-add-multiple-products/src/Frontend/Views/html-sc-input-field.php:2

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: woocommerce, ajax, add-to-cart, shopping-cart, cart

woocom-add-multiple-products/woocom-add-multiple-products.php Passed 13 tests

The principal PHP file in "WooCom Add Multiple Products" v. 3.0.0 is loaded by WordPress automatically on each request
84 characters long description:
A plugin for adding bulk product by SKU or product name to cart when you're in cart.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,046 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP17152485918
JavaScript212144
Markdown427044
JSON20025
XML10015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity14.86
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods54
▷ Static methods35.56%
▷ Public methods5398.15%
▷ Protected methods00.00%
▷ Private methods11.85%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
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
There were not PNG files found in your plugin