78% elex-minimum-order-amount-for-woocommerce

Code Review | ELEX Minimum Order Amount for WooCommerce

WordPress plugin ELEX Minimum Order Amount for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: elex-minimum-orde...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.3
  • WordPress version: 6.3.1
  • First release: Oct 3, 2019
  • Latest release: Nov 6, 2023
  • Number of updates: 38
  • Update frequency: every 39.3 days
  • Top authors: elextensions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /10,224 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.22ms] Passed 4 tests

This is a short check of server-side resources used by ELEX Minimum Order Amount for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.81 ▲7.16
Dashboard /wp-admin3.35 ▲0.0045.62 ▼17.41
Posts /wp-admin/edit.php3.40 ▲0.0448.91 ▲4.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.57 ▼4.47
Media Library /wp-admin/upload.php3.29 ▲0.0635.11 ▲0.68

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
elex-minimum-order-amount-for-woocommerce/elex-minimum-order-amount-for-woocommerce.php_activation_date

Browser metrics Passed 4 tests

Checking browser requirements for ELEX Minimum Order Amount for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲24114.57 ▲0.191.56 ▼0.0741.53 ▼4.53
Dashboard /wp-admin2,402 ▲2255.58 ▼0.0786.92 ▼13.3243.93 ▼0.23
Posts /wp-admin/edit.php2,314 ▲2142.14 ▲0.2040.43 ▲3.0236.33 ▼0.11
Add New Post /wp-admin/post-new.php1,744 ▲21522.99 ▼0.41672.79 ▼106.6949.31 ▼12.03
Media Library /wp-admin/upload.php1,613 ▲2134.19 ▼0.0498.97 ▼10.9347.16 ▲3.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • elex-minimum-order-amount-for-woocommerce/elex-minimum-order-amount-for-woocommerce.php_activation_date
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/elex-minimum-order-amount-for-woocommerce/review_and_troubleshoot_notify/resources/logo.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-minimum-order-amount-for-woocommerce/review_and_troubleshoot_notify/resources/review.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/elex-minimum-order-amount-for-woocommerce/includes/market.php:99
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/elex-minimum-order-amount-for-woocommerce/review_and_troubleshoot_notify/resources/troubleshoot.php:59

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

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: minimum order, checkout restriction, woocommerce, role-based restriction, minimum order amount

elex-minimum-order-amount-for-woocommerce/elex-minimum-order-amount-for-woocommerce.php 85% from 13 tests

The entry point to "ELEX Minimum Order Amount for WooCommerce" version 1.3.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "2.6")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin10,288 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS11069,440
PHP98431848

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.33
▷ Minimum class complexity8.00
▷ Maximum class complexity15.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.67MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assests/img/bulk_edit.png69.40KB15.94KB▼ 77.03%
assests/img/address_validation.png92.01KB25.03KB▼ 72.79%
assests/img/dhl.png60.09KB12.00KB▼ 80.03%
assests/img/wsdesk.png161.93KB43.90KB▼ 72.89%
assests/img/easy_post.png138.94KB38.02KB▼ 72.63%