78% wc-importer-for-danea

Code Review | WooCommerce Importer for Danea

WordPress plugin WooCommerce Importer for Danea scored78%from 54 tests.

About plugin

  • Plugin page: wc-importer-for-d...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 11, 2016
  • Latest release: Sep 18, 2023
  • Number of updates: 29
  • Update frequency: every 87.3 days
  • Top authors: ghera74 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

100+ active /5,781 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 gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▲1.06ms] Passed 4 tests

An overview of server-side resources used by WooCommerce Importer for Danea
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1950.06 ▲8.72
Dashboard /wp-admin3.48 ▲0.1358.79 ▼6.60
Posts /wp-admin/edit.php3.59 ▲0.2357.71 ▼1.66
Add New Post /wp-admin/post-new.php6.06 ▲0.17105.35 ▲3.77
Media Library /wp-admin/upload.php3.40 ▲0.1754.67 ▲17.14

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Importer for Danea
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,056 ▲29514.34 ▼0.222.10 ▲0.3339.66 ▼1.81
Dashboard /wp-admin2,287 ▲1105.65 ▼0.0095.93 ▲3.8146.84 ▲6.81
Posts /wp-admin/edit.php2,195 ▲951.95 ▼0.0836.84 ▼2.7839.32 ▼1.14
Add New Post /wp-admin/post-new.php1,607 ▲7922.51 ▼0.78572.72 ▼65.2639.52 ▼11.85
Media Library /wp-admin/upload.php1,489 ▲894.08 ▼0.26103.61 ▲2.5946.56 ▼0.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wc-importer-for-danea/vendor/plugin-update-checker/build/bump-version.php
  • 25× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_names() on null in wp-content/plugins/wc-importer-for-danea/admin/wcifd-import-supplier-template.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-importer-for-danea/admin/wcifd-admin.php:31
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_names() on null in wp-content/plugins/wc-importer-for-danea/admin/wcifd-import-clients-template.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\Update' not found in wp-content/plugins/wc-importer-for-danea/vendor/plugin-update-checker/Puc/v5p2/Plugin/Update.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-importer-for-danea/admin/wcifd-import-orders-template.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\Vcs\\Api' not found in wp-content/plugins/wc-importer-for-danea/vendor/plugin-update-checker/Puc/v5p2/Vcs/GitHubApi.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wc-importer-for-danea/admin/ilghera-notice/class-ilghera-notice.php:214
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\Update' not found in wp-content/plugins/wc-importer-for-danea/vendor/plugin-update-checker/Puc/v5p2/Theme/Update.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\UpdateChecker' not found in wp-content/plugins/wc-importer-for-danea/vendor/plugin-update-checker/Puc/v5p2/Plugin/UpdateChecker.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'YahnisElsts\\PluginUpdateChecker\\v5p2\\Vcs\\Api' not found in wp-content/plugins/wc-importer-for-danea/vendor/plugin-update-checker/Puc/v5p2/Vcs/GitLabApi.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: exporter, gestionale, shop, danea easyfatt, fattura elettronica...

wc-importer-for-danea/wc-importer-for-danea.php 92% from 13 tests

The primary PHP file in "WooCommerce Importer for Danea" version 1.3.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)

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
Success! There were no dangerous files found in this plugin12,267 lines of code in 115 files:
LanguageFilesBlank linesComment linesLines of code
PHP631,8983,1186,990
JavaScript8291342,721
PO File253093941,152
CSS714949782
Markdown31110336
JSON780261
XML14413
YAML13412

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity20.11
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces8
Interfaces1
Traits3
Classes40
▷ Abstract classes512.50%
▷ Concrete classes3587.50%
▷ Final classes00.00%
Methods429
▷ Static methods4510.49%
▷ Public methods27363.64%
▷ Protected methods13932.40%
▷ Private methods173.96%
Functions39
▷ Named functions3282.05%
▷ Anonymous functions717.95%
Constants16
▷ Global constants531.25%
▷ Class constants1168.75%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/tzCheckbox/img/page_bg.png0.19KB0.26KB0.00%
js/tzCheckbox/jquery.tzCheckbox/background-small.png3.88KB2.22KB▼ 42.84%
js/tzCheckbox/jquery.tzCheckbox/background.png4.96KB2.59KB▼ 47.82%
vendor/harvesthq/chosen/chosen-sprite.png0.53KB0.88KB0.00%
js/tzCheckbox/img/line_bg.png0.26KB0.23KB▼ 9.16%