73% frete-onlog

Code Review | Onlog Franqueador - Onlog for WooCommerce

WordPress plugin Onlog Franqueador - Onlog for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: frete-onlog
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-5.5
  • WordPress version: 6.3.1
  • First release: Aug 29, 2023
  • Latest release: Aug 29, 2023
  • Number of updates: 6
  • Update frequency: every 3.0 days
  • Top authors: onlogdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /48 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.93MB] [CPU: ▼53.72ms] Passed 4 tests

Server-side resources used by Onlog Franqueador - Onlog for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.42 ▼38.68
Dashboard /wp-admin2.08 ▼1.227.67 ▼49.12
Posts /wp-admin/edit.php2.08 ▼1.286.41 ▼39.12
Add New Post /wp-admin/post-new.php2.08 ▼3.816.75 ▼87.95
Media Library /wp-admin/upload.php2.08 ▼1.156.30 ▼26.96

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Onlog Franqueador - Onlog for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.61 ▼0.651.68 ▲0.0238.22 ▼7.20
Dashboard /wp-admin2,203 ▲325.83 ▲0.93101.98 ▼12.8838.53 ▼11.61
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0241.90 ▲6.8436.79 ▼3.20
Add New Post /wp-admin/post-new.php1,519 ▲523.44 ▲5.87656.67 ▼7.8567.07 ▲15.60
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.0198.28 ▼7.8341.43 ▼3.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/frete-onlog/includes/class-wc-onlog.php+14
    Trying to get property 'query_vars' of non-object
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Onlog_Shipping' not found in wp-content/plugins/frete-onlog/includes/shipping/class-wc-onlog-shipping.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/frete-onlog/includes/integrations/class-wc-onlog-integration.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: onlog, delivery, shipping, woocommerce

frete-onlog/woocommerce-onlog.php 69% from 13 tests

The main PHP script in "Onlog Franqueador - Onlog for WooCommerce" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "2.2")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("frete-onlog.php" instead of "woocommerce-onlog.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 detected285 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP88217285

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.71
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes116.67%
Methods19
▷ Static methods421.05%
▷ Public methods1789.47%
▷ Protected methods15.26%
▷ Private methods15.26%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin