10% repeat-order-for-woocommerce

Code Review | Repeat Order for WooCommerce

WordPress plugin Repeat Order for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: repeat-order-for-...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2018
  • Latest release: Nov 21, 2023
  • Number of updates: 39
  • Update frequency: every 48.4 days
  • Top authors: polyres (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

3,000+ active /18,056 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Error in wp-content/plugins/repeat-order-for-woocommerce/repeat-order-for-woocommerce.php+442
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/repeat-order-for-woocommerce/repeat-order-for-woocommerce.php:442
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): RepeatOrderForWoocommerce::install()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.31ms] Passed 4 tests

This is a short check of server-side resources used by Repeat Order for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.04 ▼13.91
Dashboard /wp-admin3.32 ▼0.0345.95 ▼20.95
Posts /wp-admin/edit.php3.37 ▲0.0048.80 ▲1.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0092.96 ▲0.11
Media Library /wp-admin/upload.php3.24 ▲0.0044.47 ▲13.29

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 12 new options
New WordPress options
prro_create_order_note
can_compress_scripts
prro_show_reorder_in_email
prro_show_user_reorder_list
prro_cart_notice
widget_recent-posts
db_upgraded
widget_recent-comments
prro_show_repeat_order_on_order_list
prro_reactivate_action
...

Browser metrics Passed 4 tests

A check of browser resources used by Repeat Order for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.34 ▲0.151.70 ▼0.0536.27 ▼10.99
Dashboard /wp-admin2,198 ▲215.60 ▼0.0795.16 ▲10.1442.28 ▲0.20
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0138.94 ▲1.6537.37 ▲3.21
Add New Post /wp-admin/post-new.php1,526 ▼023.43 ▲2.45679.94 ▲61.0852.86 ▼2.89
Media Library /wp-admin/upload.php1,397 ▲34.14 ▼0.02124.20 ▲30.0554.58 ▲12.09

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Error in wp-content/plugins/repeat-order-for-woocommerce/repeat-order-for-woocommerce.php+469
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/repeat-order-for-woocommerce/repeat-order-for-woocommerce.php:469
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): RepeatOrderForWoocommerce::uninstall()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(1269): do_action()
    #4 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 6 files (0.05MB) in the plugin directory
    • (new file) repeat-order-for-woocommerce.php
    • (new file) readme.txt
    • (new file) languages/repeat-order-for-woocommerce.pot
    • (new file) LICENSE
    • (new file) images/reorder.png
    • (new file) style.css
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • prro_show_reorder_in_email
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: woocommerce, order again

repeat-order-for-woocommerce/repeat-order-for-woocommerce.php 92% from 13 tests

The entry point to "Repeat Order for WooCommerce" version 1.3.1 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 must be the same as the one declared in readme.txt ("4.8" instead of "3.4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin463 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP159207423
CSS14040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity56.00
▷ Minimum class complexity56.00
▷ Maximum class complexity56.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods27
▷ Static methods518.52%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/reorder.png0.35KB0.25KB▼ 30.30%