74% wc-importer-for-reviso

Code Review | WooCommerce Importer for Reviso

WordPress plugin WooCommerce Importer for Reviso scored74%from 54 tests.

About plugin

  • Plugin page: wc-importer-for-r...
  • Plugin version: 0.9.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 30, 2021
  • Latest release: Nov 9, 2022
  • Number of updates: 11
  • Update frequency: every 45.2 days
  • Top authors: ghera74 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /670 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.22MB] [CPU: ▲0.56ms] Passed 4 tests

Server-side resources used by WooCommerce Importer for Reviso
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2445.56 ▲3.24
Dashboard /wp-admin3.52 ▲0.2255.16 ▲6.02
Posts /wp-admin/edit.php3.64 ▲0.2857.20 ▲4.36
Add New Post /wp-admin/post-new.php6.10 ▲0.2292.33 ▼11.37
Media Library /wp-admin/upload.php3.45 ▲0.2241.38 ▲10.96
Scheduled Actions /wp-admin/tools.php?page=action-scheduler3.6167.14

Server storage [IO: ▲1.49MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 211 new files
Database: 5 new tables, 10 new options
New tables
wp_actionscheduler_groups
wp_actionscheduler_logs
wp_actionscheduler_claims
wp_wcifr_users_temporary_data
wp_actionscheduler_actions
New WordPress options
action_scheduler_lock_async-request-runner
schema-ActionScheduler_LoggerSchema
can_compress_scripts
widget_recent-posts
schema-ActionScheduler_StoreSchema
db_upgraded
widget_recent-comments
widget_theysaidso_widget
action_scheduler_hybrid_store_demarkation
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Importer for Reviso
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.38 ▼0.031.78 ▼0.1241.90 ▼3.20
Dashboard /wp-admin2,201 ▲215.60 ▼0.0492.65 ▲1.7040.51 ▼1.89
Posts /wp-admin/edit.php2,103 ▼01.99 ▼0.0540.56 ▼1.5935.15 ▼4.10
Add New Post /wp-admin/post-new.php1,554 ▲1418.38 ▼4.52600.86 ▲10.2347.44 ▼10.49
Media Library /wp-admin/upload.php1,400 ▲34.20 ▲0.0298.27 ▼1.0640.20 ▼3.88
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2511.8223.3430.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 5 tables in the database
    • wp_actionscheduler_claims
    • wp_wcifr_users_temporary_data
    • wp_actionscheduler_logs
    • wp_actionscheduler_actions
    • wp_actionscheduler_groups
  • Zombie WordPress options detected upon uninstall: 10 options
    • action_scheduler_lock_async-request-runner
    • db_upgraded
    • schema-ActionScheduler_LoggerSchema
    • action_scheduler_hybrid_store_demarkation
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • schema-ActionScheduler_StoreSchema
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

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
  • 84× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/tests/phpunit/procedural_api/wc_get_scheduled_actions_Test.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/tests/phpunit/helpers/ActionScheduler_Compatibility_Test.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/classes/actions/ActionScheduler_NullAction.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/tests/phpunit/migration/Scheduler_Test.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/classes/data-stores/ActionScheduler_DBStore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_LogEntry' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/classes/ActionScheduler_NullLogEntry.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/tests/phpunit/migration/Controller_Test.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Action' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/classes/actions/ActionScheduler_FinishedAction.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/tests/phpunit/migration/LogMigrator_Test.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Store' not found in wp-content/plugins/wc-importer-for-reviso/libraries/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: danea easyfatt, fatturazione, invoice, team system, reviso...

wc-importer-for-reviso/wc-importer-for-reviso.php Passed 13 tests

Analyzing the main PHP file in "WooCommerce Importer for Reviso" version 0.9.2
82 characters long description:
Connect your store to Reviso and import orders, products, customers and suppliers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected24,608 lines of code in 182 files:
LanguageFilesBlank linesComment linesLines of code
PHP1332,7355,8259,829
CSS6139487,875
JavaScript85061012,998
JSON8002,599
Markdown133950702
Bourne Shell12311147
YAML51810123
PO File1128250105
XML38391
HTML28052
Sass110047
SVG10040

PHP code Passed 2 tests

Analyzing 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.21
Average class complexity8.92
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces4
Interfaces3
Traits0
Classes116
▷ Abstract classes1613.79%
▷ Concrete classes10086.21%
▷ Final classes00.00%
Methods842
▷ Static methods708.31%
▷ Public methods66779.22%
▷ Protected methods14216.86%
▷ Private methods333.92%
Functions40
▷ Named functions2357.50%
▷ Anonymous functions1742.50%
Constants44
▷ Global constants1022.73%
▷ Class constants3477.27%
▷ Public constants34100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.04MB with 0.02MB 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%
libraries/action-scheduler/docs/apple-touch-icon.png6.77KB2.46KB▼ 63.68%
libraries/action-scheduler/docs/android-chrome-192x192.png6.77KB2.46KB▼ 63.68%
vendor/harvesthq/chosen/chosen-sprite.png0.53KB0.88KB0.00%
images/pdf.png5.10KB0.52KB▼ 89.77%