68% export-vers-prepafacile-pour-woocommerce

Code Review | Export vers Prepafacile pour Woocommerce

WordPress plugin Export vers Prepafacile pour Woocommerce scored68%from 54 tests.

About plugin

  • Plugin page: export-vers-prepa...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2020
  • Latest release: Oct 31, 2022
  • Number of updates: 12
  • Update frequency: every 61.4 days
  • Top authors: prestamagician (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /488 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Export vers Prepafacile pour Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1044.23 ▲3.93
Dashboard /wp-admin3.53 ▲0.1948.90 ▲0.20
Posts /wp-admin/edit.php3.65 ▲0.2551.78 ▼4.64
Add New Post /wp-admin/post-new.php6.12 ▲0.1982.69 ▼12.24
Media Library /wp-admin/upload.php3.46 ▲0.1936.84 ▲1.74
Settings /wp-admin/admin.php?page=woo2prepafacile-settings3.4034.75
Export vers Prepafacile /wp-admin/admin.php?page=woo2prepafacile-export3.4235.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: 1 new table, 13 new options
New tables
wp_woo2prepafacile
New WordPress options
db_upgraded
recovery_mode_email_last_sent
widget_recent-posts
PREPAFACILE_STATE_EXPORT
theysaidso_admin_options
PREPAFACILE_STATE_ENVOIE
PREPAFACILE_REFEXP
can_compress_scripts
widget_recent-comments
PREPAFACILE_CONTRAT
...

Browser metrics Passed 4 tests

Checking browser requirements for Export vers Prepafacile pour Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4314.18 ▼0.171.78 ▼0.6144.04 ▼0.34
Dashboard /wp-admin2,235 ▲585.55 ▼0.1283.46 ▼4.7440.64 ▼4.44
Posts /wp-admin/edit.php2,141 ▲412.00 ▲0.0637.21 ▼3.4336.98 ▲1.19
Add New Post /wp-admin/post-new.php1,561 ▲2123.19 ▼0.14672.92 ▼70.8953.81 ▼2.36
Media Library /wp-admin/upload.php1,443 ▲434.23 ▼0.09100.19 ▼2.2645.09 ▼1.51
Settings /wp-admin/admin.php?page=woo2prepafacile-settings7221.548.4125.82
Export vers Prepafacile /wp-admin/admin.php?page=woo2prepafacile-export9851.8123.3835.85

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_woo2prepafacile
  • Zombie WordPress options were found after uninstall: 13 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • PREPAFACILE_DB_VERSION
    • db_upgraded
    • theysaidso_admin_options
    • PREPAFACILE_STATE_ENVOIE
    • WOO2PREPAFACILE_VERSION
    • widget_recent-comments
    • ...

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
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=woo2prepafacile-settings
    • > Error in wp-content/plugins/export-vers-prepafacile-pour-woocommerce/woo2prepafacile.php+265
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/export-vers-prepafacile-pour-woocommerce/woo2prepafacile.php:265
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): WOO2PrepafacileSettings->woo2prepafacile_settings_create_admin_page()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/export-vers-prepafacile-pour-woocommerce/languages/js-translate.php
    • > /wp-content/plugins/export-vers-prepafacile-pour-woocommerce/controllers/admin/woo2prepafacile-admin-installdb.php
    • > /wp-content/plugins/export-vers-prepafacile-pour-woocommerce/controllers/admin/woo2prepafacile-admin-ajax.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: prepafacile, la poste, courrier suivi, lettre suivi, woocommerce

export-vers-prepafacile-pour-woocommerce/woo2prepafacile.php 85% from 13 tests

The main file in "Export vers Prepafacile pour Woocommerce" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("export-vers-prepafacile-pour-woocommerce.php" instead of "woo2prepafacile.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 detected1,113 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5149146804
JavaScript13214125
PO File13738104
CSS11080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity26.00
▷ Minimum class complexity25.00
▷ Maximum class complexity27.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2184.00%
▷ Protected methods00.00%
▷ Private methods416.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin