74% wc-exporter-for-reviso

Code Review | WooCommerce Exporter for Reviso

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

About plugin

  • Plugin page: wc-exporter-for-r...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: May 21, 2020
  • Latest release: May 24, 2023
  • Number of updates: 23
  • Update frequency: every 47.8 days
  • Top authors: ghera74 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,245 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.45MB] [CPU: ▲284.03ms] 75% from 4 tests

A check of server-side resources used by WooCommerce Exporter for Reviso
Please take the time to fix the following items
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 284.03ms on /wp-admin/tools.php?page=action-scheduler)
PageMemory (MB)CPU Time (ms)
Home /4.93 ▲1.47317.67 ▲281.39
Dashboard /wp-admin4.75 ▲1.45334.84 ▲286.02
Posts /wp-admin/edit.php4.80 ▲1.45346.27 ▲299.41
Add New Post /wp-admin/post-new.php7.35 ▲1.47382.72 ▲289.16
Media Library /wp-admin/upload.php4.67 ▲1.45311.13 ▲279.55
Scheduled Actions /wp-admin/tools.php?page=action-scheduler4.82324.42

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 224 new files
Database: 4 new tables, 10 new options
New tables
wp_actionscheduler_groups
wp_actionscheduler_claims
wp_actionscheduler_actions
wp_actionscheduler_logs
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
action_scheduler_lock_async-request-runner
action_scheduler_hybrid_store_demarkation
can_compress_scripts
schema-ActionScheduler_LoggerSchema
schema-ActionScheduler_StoreSchema

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Exporter for Reviso
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲6913.24 ▼1.132.24 ▲0.2435.85 ▼8.07
Dashboard /wp-admin2,215 ▲245.85 ▼0.05106.13 ▲4.2437.18 ▼4.77
Posts /wp-admin/edit.php2,098 ▲92.02 ▲0.0135.53 ▼0.8333.24 ▼1.35
Add New Post /wp-admin/post-new.php1,535 ▲1620.89 ▼2.25644.22 ▼36.8549.29 ▼5.32
Media Library /wp-admin/upload.php1,394 ▲34.32 ▲0.08105.34 ▲7.8244.98 ▲0.06
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2431.8329.8232.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 4 tables in the database
    • wp_actionscheduler_claims
    • wp_actionscheduler_groups
    • wp_actionscheduler_logs
    • wp_actionscheduler_actions
  • This plugin does not fully uninstall, leaving 10 options in the database
    • schema-ActionScheduler_LoggerSchema
    • widget_theysaidso_widget
    • action_scheduler_lock_async-request-runner
    • theysaidso_admin_options
    • can_compress_scripts
    • schema-ActionScheduler_StoreSchema
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • action_scheduler_hybrid_store_demarkation

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 89× 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-exporter-for-reviso/libraries/action-scheduler/tests/phpunit/jobstore/ActionScheduler_DBStoreMigrator_Test.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wc-exporter-for-reviso/libraries/action-scheduler/classes/abstracts/ActionScheduler_Abstract_ListTable.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/wc-exporter-for-reviso/libraries/action-scheduler/tests/phpunit/helpers/ActionScheduler_TimezoneHelper_Test.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_UnitTestCase' not found in wp-content/plugins/wc-exporter-for-reviso/libraries/action-scheduler/tests/phpunit/procedural_api/wc_get_scheduled_actions_Test.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_DBStore' not found in wp-content/plugins/wc-exporter-for-reviso/libraries/action-scheduler/classes/migration/ActionScheduler_DBStoreMigrator.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-exporter-for-reviso/admin/wcefr-settings-template.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wc-exporter-for-reviso/admin/wcefr-customers-template.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Abstract_ListTable' not found in wp-content/plugins/wc-exporter-for-reviso/libraries/action-scheduler/classes/ActionScheduler_ListTable.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_SimpleSchedule' not found in wp-content/plugins/wc-exporter-for-reviso/libraries/action-scheduler/classes/schedules/ActionScheduler_CanceledSchedule.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ActionScheduler_Logger' not found in wp-content/plugins/wc-exporter-for-reviso/libraries/action-scheduler/classes/data-stores/ActionScheduler_wpCommentLogger.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: contabilit in cloud, reviso, invoice, danea easyfatt, team system...

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

The main PHP script in "WooCommerce Exporter for Reviso" version 1.2.0 is automatically included on every request by WordPress
82 characters long description:
Connect your store to Reviso and export orders, products, customers and suppliers.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin30,889 lines of code in 194 files:
LanguageFilesBlank linesComment linesLines of code
PHP1424,1417,14512,899
CSS6142607,889
JSON8005,293
JavaScript106571463,216
Markdown134000729
PO File1146189335
YAML62619151
Bourne Shell12311147
XML38391
HTML28052
Sass110047
SVG10040

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 complexity12.52
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces5
Interfaces3
Traits0
Classes121
▷ Abstract classes1613.22%
▷ Concrete classes10586.78%
▷ Final classes00.00%
Methods960
▷ Static methods868.96%
▷ Public methods74978.02%
▷ Protected methods14515.10%
▷ Private methods666.88%
Functions53
▷ Named functions2139.62%
▷ Anonymous functions3260.38%
Constants58
▷ Global constants2441.38%
▷ Class constants3458.62%
▷ Public constants34100.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
15 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/tzCheckbox/jquery.tzCheckbox/background-small.png3.88KB2.22KB▼ 42.84%
libraries/action-scheduler/docs/apple-touch-icon.png6.77KB2.46KB▼ 63.68%
js/tzCheckbox/img/line_bg.png0.26KB0.23KB▼ 9.16%
libraries/action-scheduler/docs/favicon-16x16.png0.39KB0.38KB▼ 3.02%
libraries/action-scheduler/docs/favicon-32x32.png1.16KB0.71KB▼ 39.02%