68% welco

Code Review | Welco

WordPress plugin Welco scored68%from 54 tests.

About plugin

  • Plugin page: welco
  • Plugin version: 1.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 16, 2021
  • Latest release: Oct 4, 2022
  • Number of updates: 15
  • Update frequency: every 29.8 days
  • Top authors: welco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /712 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.72MB] [CPU: ▼53.50ms] Passed 4 tests

A check of server-side resources used by Welco
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.206.69 ▼36.87
Dashboard /wp-admin2.28 ▼1.027.86 ▼47.51
Posts /wp-admin/edit.php2.29 ▼1.078.74 ▼41.38
Add New Post /wp-admin/post-new.php2.28 ▼3.6012.13 ▼88.25
Media Library /wp-admin/upload.php2.28 ▼0.948.31 ▼30.69
welco /wp-admin/admin.php?page=commandes-welco-parent2.286.55
Commandes welco /wp-admin/admin.php?page=commandes-welco2.287.99

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Welco
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲17513.63 ▼1.047.52 ▲4.8945.96 ▼0.63
Dashboard /wp-admin2,235 ▲474.86 ▼0.01103.32 ▼4.3138.33 ▼6.20
Posts /wp-admin/edit.php2,118 ▲292.07 ▲0.0739.40 ▼1.3438.74 ▲2.17
Add New Post /wp-admin/post-new.php1,552 ▲1623.00 ▼0.14667.49 ▲1.9256.72 ▼3.53
Media Library /wp-admin/upload.php1,417 ▲264.16 ▼0.04100.53 ▼9.6845.39 ▲1.32
welco /wp-admin/admin.php?page=commandes-welco-parent1,1992.0324.0627.50
Commandes welco /wp-admin/admin.php?page=commandes-welco8281.7625.7332.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_localize_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax_main handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=commandes-welco
    • > User notice in wp-includes/functions.php+5905
    Function wp_localize_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the ajax_main handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/admin.php?page=commandes-welco-parent
    • > Warning in wp-content/plugins/welco/template/admin-parameters.php+4
    session_start(): Cannot start session when headers already sent

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
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welco/class-wc-welco.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welco/class-wc-welco-home.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welco/class-wc-welco-welker.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welco/cron.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welco/class-wc-welco-home.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/welco/welco-orders.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

welco/welco-woocommerce.php 92% from 13 tests

The main file in "Welco" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("welco.php" instead of "welco-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,604 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8202921,280
JavaScript12312214
CSS1182110

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity2.75
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods14.35%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions42
▷ Named functions4197.62%
▷ Anonymous functions12.38%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin