78% orders-to-route4me-for-woocommerce

Code Review | Orders to Route4Me for WooCommerce

WordPress plugin Orders to Route4Me for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: orders-to-route4m...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2016
  • Latest release: Dec 1, 2022
  • Number of updates: 13
  • Update frequency: every 170.4 days
  • Top authors: valegucci (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,064 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.18MB] [CPU: ▼0.93ms] Passed 4 tests

Server-side resources used by Orders to Route4Me for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.56 ▼0.17
Dashboard /wp-admin3.48 ▲0.1846.82 ▼9.63
Posts /wp-admin/edit.php3.60 ▲0.2450.86 ▲1.78
Add New Post /wp-admin/post-new.php6.07 ▲0.1898.16 ▲5.02
Media Library /wp-admin/upload.php3.40 ▲0.1839.39 ▲4.29

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Orders to Route4Me for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.35 ▼1.031.90 ▲0.2144.18 ▼3.18
Dashboard /wp-admin2,216 ▲285.90 ▲0.01100.47 ▼15.5539.53 ▼7.56
Posts /wp-admin/edit.php2,104 ▲152.04 ▲0.0339.98 ▲4.8335.58 ▼2.63
Add New Post /wp-admin/post-new.php1,523 ▼1023.10 ▼0.11664.15 ▲23.2358.79 ▲0.42
Media Library /wp-admin/upload.php1,406 ▲184.36 ▲0.1496.13 ▼7.6743.33 ▼0.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/orders-to-route4me-for-woocommerce/route4me_woo.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/orders-to-route4me-for-woocommerce/include/metas.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/orders-to-route4me-for-woocommerce/include/enqueue-scripts.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/orders-to-route4me-for-woocommerce/include/synchronize.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/orders-to-route4me-for-woocommerce/include/settings.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 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
9 plugin tags: route4me, order to route, routing, route planning, ecommerce...

orders-to-route4me-for-woocommerce/route4me_woo.php 85% from 13 tests

The main file in "Orders to Route4Me for WooCommerce" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("orders-to-route4me-for-woocommerce.php" instead of "route4me_woo.php")

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
No dangerous file extensions were detected1,306 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP721359926
CSS1111234
JavaScript2198146

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/favicon.png0.70KB0.67KB▼ 4.06%
img/r4m.png14.96KB0.76KB▼ 94.93%