10% woocollections-for-woocommerce

Code Review | WooCollections for WooCommerce

WordPress plugin WooCollections for WooCommerce scored 10% from 54 tests.

About plugin

  • Plugin page: woocollections-fo...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.0.2
  • WordPress version: 5.9.2
  • First release: Sep 1, 2015
  • Latest release: Dec 30, 2018
  • Number of updates: 5
  • Update frequency: every 243.0 days
  • Top authors: suiteplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,362 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/woocollections-for-woocommerce/init.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; woo_collection has a deprecated constructor

Server metrics [RAM: ▼2.39MB] [CPU: ▼351.04ms] Passed 4 tests

Analyzing server-side resources used by WooCollections for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.98 ▼1.544.57 ▼46.09
Dashboard /wp-admin1.99 ▼1.414.15 ▼32.36
Posts /wp-admin/edit.php2.00 ▼1.644.26 ▼31.48
Add New Post /wp-admin/post-new.php1.99 ▼4.974.05 ▼1,294.24
Media Library /wp-admin/upload.php1.99 ▼1.303.91 ▼19.82
Widgets /wp-admin/widgets.php2.004.27
Menus /wp-admin/nav-menus.php2.134.45
All Collections /wp-admin/edit.php?post_type=woo_collection2.004.41
Add New /wp-admin/post-new.php?post_type=woo_collection2.003.95

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WooCollections for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,978 ▲22416.32 ▲0.6111.45 ▲5.212.66 ▲0.16
Dashboard /wp-admin2,937 ▲766.05 ▼0.12117.29 ▼25.47157.45 ▼7.39
Posts /wp-admin/edit.php2,738 ▲443.23 ▼0.0164.48 ▼0.28140.49 ▼4.71
Add New Post /wp-admin/post-new.php1,787 ▲12621.41 ▲4.79456.76 ▲31.34155.48 ▲0.37
Media Library /wp-admin/upload.php1,741 ▲435.51 ▼0.01144.73 ▲2.25188.56 ▲1.62
Widgets /wp-admin/widgets.php2,51023.76527.19129.83
Menus /wp-admin/nav-menus.php2,3213.3180.38127.68
All Collections /wp-admin/edit.php?post_type=woo_collection1,4212.9260.17113.56
Add New /wp-admin/post-new.php?post_type=woo_collection2,83210.08181.71203.29

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
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/woocollections-for-woocommerce/init.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; woo_collection has a deprecated constructor

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=woo_collection
    • > Deprecated in wp-content/plugins/woocollections-for-woocommerce/init.php+13
    Methods with the same name as their class will not be constructors in a future version of PHP; woo_collection has a deprecated constructor

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
Please take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocollections-for-woocommerce/init.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/woocollections-for-woocommerce/woocollections-for-woocommerce.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woocollections-for-woocommerce/includes/um-setup.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocollections-for-woocommerce/includes/bp-setup.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (**Collection Link** - Clickable link to open Collection Modal), #2 (**Collection Modal** - Area where a user can edit and remove a product from their collection as well as create a new Collection), #3 (**User's Collection** - A list of a user's collection)
The official readme.txt is a good inspiration

woocollections-for-woocommerce/woocollections-for-woocommerce.php Passed 13 tests

Analyzing the main PHP file in "WooCollections for WooCommerce" version 1.0.1
80 characters long description:
Adds the ability for users to create collections of items and share with friends

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin973 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP529147433
JavaScript24437353
CSS3812111
PO File1303176

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity16.00
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin