68% ubilop

Code Review | Sendingbay módulo E-commerce

WordPress plugin Sendingbay módulo E-commerce scored68%from 54 tests.

About plugin

  • Plugin page: ubilop
  • Plugin version: 3.0.8
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-6.0
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: May 30, 2023
  • Number of updates: 165
  • Update frequency: every 5.3 days
  • Top authors: ubilop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,157 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.55MB] [CPU: ▲4.40ms] Passed 4 tests

An overview of server-side resources used by Sendingbay módulo E-commerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.96 ▲1.5051.95 ▲9.07
Dashboard /wp-admin4.98 ▲1.6467.91 ▼4.14
Posts /wp-admin/edit.php4.98 ▲1.6361.89 ▲9.84
Add New Post /wp-admin/post-new.php7.32 ▲1.44111.18 ▲2.83
Media Library /wp-admin/upload.php4.98 ▲1.7550.51 ▲12.12

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 44 new files
Database: 5 new tables, 6 new options
New tables
wp_fact_return
wp_fact_sender
wp_fact_config
wp_fact_data
wp_fact_cron
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Sendingbay módulo E-commerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲3014.23 ▼0.121.69 ▼0.3345.04 ▼0.15
Dashboard /wp-admin2,210 ▲335.69 ▲0.0787.85 ▼11.8938.36 ▼4.24
Posts /wp-admin/edit.php2,180 ▲832.90 ▲0.8955.15 ▲18.1932.85 ▼0.15
Add New Post /wp-admin/post-new.php1,536 ▲1023.01 ▼0.06664.84 ▼20.6455.97 ▲1.14
Media Library /wp-admin/upload.php1,412 ▲154.21 ▼0.01100.34 ▼4.3341.04 ▼5.64

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ubilop/includes/class-fact-cron.php+37
    Trying to get property 'hora' of non-object
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 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
Please fix the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ubilop/ubilop-plugin-wp.php
    • > /wp-content/plugins/ubilop/public/partials/fact-public-display.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ubilop/admin/partials/fact-return-display.php:28
    • > PHP Warning
      Use of undefined constant UBILOP_PLUGIN_DIR_URL - assumed 'UBILOP_PLUGIN_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ubilop/admin/partials/fact-return-display.php on line 16
    • > PHP Warning
      Use of undefined constant UBILOP_TABLE_DATA - assumed 'UBILOP_TABLE_DATA' (this will throw an Error in a future version of PHP) in wp-content/plugins/ubilop/admin/partials/fact-order-display.php on line 29
    • > PHP Warning
      Use of undefined constant UBILOP_WS_CONFIG - assumed 'UBILOP_WS_CONFIG' (this will throw an Error in a future version of PHP) in wp-content/plugins/ubilop/admin/partials/fact-return-display.php on line 27
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ubilop/admin/partials/fact-config-display.php:20
    • > PHP Warning
      Use of undefined constant UBILOP_TABLE_CONFIG - assumed 'UBILOP_TABLE_CONFIG' (this will throw an Error in a future version of PHP) in wp-content/plugins/ubilop/admin/partials/fact-config-display.php on line 19
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ubilop/admin/partials/fact-order-display.php:30
    • > PHP Warning
      Use of undefined constant UBILOP_PLUGIN_DIR_URL - assumed 'UBILOP_PLUGIN_DIR_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ubilop/admin/partials/fact-order-display.php on line 16
    • > PHP Warning
      Use of undefined constant UBILOP_TABLE_RETURN - assumed 'UBILOP_TABLE_RETURN' (this will throw an Error in a future version of PHP) in wp-content/plugins/ubilop/admin/partials/fact-return-display.php on line 27
    • > PHP Warning
      Use of undefined constant UBILOP_WS_CONFIG - assumed 'UBILOP_WS_CONFIG' (this will throw an Error in a future version of PHP) in wp-content/plugins/ubilop/admin/partials/fact-order-display.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 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
10 plugin tags: correos, fact, sendingbay, mensajera, ubilop...

ubilop/ubilop-plugin-wp.php 85% from 13 tests

The principal PHP file in "Sendingbay módulo E-commerce" v. 3.0.8 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ubilop.php" instead of "ubilop-plugin-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected23,867 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,3693,4858,333
JavaScript52,0732,2587,936
CSS41,4534447,598

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity59.38
▷ Minimum class complexity1.00
▷ Maximum class complexity390.00
Average method complexity8.09
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods214
▷ Static methods20.93%
▷ Public methods20696.26%
▷ Protected methods00.00%
▷ Private methods83.74%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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
2 PNG files occupy 0.47MB with 0.28MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/lg-ubi.png290.33KB119.56KB▼ 58.82%
admin/img/sb-black.png193.51KB76.38KB▼ 60.53%