84% easy-collect-and-drop

Code Review | Easy Collect And Drop for WooCommerce

WordPress plugin Easy Collect And Drop for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: easy-collect-and-...
  • Plugin version: 2.1.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.0
  • WordPress version: 6.3.1
  • First release: Aug 16, 2021
  • Latest release: Jun 1, 2023
  • Number of updates: 21
  • Update frequency: every 31.3 days
  • Top authors: andafrica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /673 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼2.97ms] Passed 4 tests

An overview of server-side resources used by Easy Collect And Drop for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.98 ▼2.08
Dashboard /wp-admin3.43 ▲0.1347.16 ▼16.10
Posts /wp-admin/edit.php3.48 ▲0.1247.63 ▲1.79
Add New Post /wp-admin/post-new.php6.01 ▲0.1298.44 ▲4.78
Media Library /wp-admin/upload.php3.35 ▲0.1236.03 ▲4.52

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 1,494 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Collect And Drop for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.44 ▲0.061.73 ▼0.6840.62 ▼8.59
Dashboard /wp-admin2,209 ▲215.88 ▲0.0297.07 ▼24.6137.04 ▼10.03
Posts /wp-admin/edit.php2,089 ▲31.96 ▼0.0439.31 ▲2.4834.29 ▼4.70
Add New Post /wp-admin/post-new.php1,533 ▲1423.33 ▲0.20689.79 ▲8.3651.13 ▼9.52
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0594.82 ▼0.5941.41 ▼0.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/easy-collect-and-drop/vendor/giggsey/libphonenumber-for-php/src/Leniency/ExactGrouping.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/easy-collect-and-drop/vendor/giggsey/libphonenumber-for-php/src/Leniency/StrictGrouping.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MatcherAPIInterface' not found in wp-content/plugins/easy-collect-and-drop/vendor/giggsey/libphonenumber-for-php/src/RegexBasedMatcher.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MetadataSourceInterface' not found in wp-content/plugins/easy-collect-and-drop/vendor/giggsey/libphonenumber-for-php/src/MultiFileMetadataSourceImpl.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/easy-collect-and-drop/vendor/giggsey/libphonenumber-for-php/src/Leniency/Valid.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/easy-collect-and-drop/easycollectanddrop.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/easy-collect-and-drop/vendor/giggsey/libphonenumber-for-php/src/Leniency/Possible.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MetadataLoaderInterface' not found in wp-content/plugins/easy-collect-and-drop/vendor/giggsey/libphonenumber-for-php/src/DefaultMetadataLoader.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
3 plugin tags: south africa, woocommerce, shipping

easy-collect-and-drop/easycollectanddrop.php 92% from 13 tests

The main file in "Easy Collect And Drop for WooCommerce" v. 2.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-collect-and-drop.php" instead of "easycollectanddrop.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected564,133 lines of code in 1,354 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,3433,21916,671562,862
JavaScript23915616
JSON410272
Markdown2840197
CSS270164
SVG10022

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity20.13
▷ Minimum class complexity1.00
▷ Maximum class complexity366.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces7
Interfaces3
Traits0
Classes44
▷ Abstract classes12.27%
▷ Concrete classes4397.73%
▷ Final classes00.00%
Methods506
▷ Static methods8316.40%
▷ Public methods41381.62%
▷ Protected methods6913.64%
▷ Private methods244.74%
Functions13
▷ Named functions969.23%
▷ Anonymous functions430.77%
Constants124
▷ Global constants43.23%
▷ Class constants12096.77%
▷ Public constants120100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/marker-locker.png19.79KB4.22KB▼ 78.65%
assets/images/marker-store.png20.32KB4.02KB▼ 80.20%