89% repeat-order-button-for-woocommerce

Code Review | WooCommerce Repeat Order Button

WordPress plugin WooCommerce Repeat Order Button scored 89% from 54 tests.

About plugin

  • Plugin page: repeat-order-butt...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.2
  • WordPress version: 6.3.1
  • First release: Apr 6, 2016
  • Latest release: Feb 2, 2018
  • Number of updates: 10
  • Update frequency: every 66.7 days
  • Top authors: Amgnando (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 4,574 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▲2.38ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Repeat Order Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0047.14 ▲13.22
Dashboard /wp-admin3.31 ▲0.0054.30 ▲9.57
Posts /wp-admin/edit.php3.36 ▲0.0040.42 ▼3.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.86 ▲8.68
Media Library /wp-admin/upload.php3.23 ▲0.0029.56 ▼4.93

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

WooCommerce Repeat Order Button: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.63 ▼0.722.03 ▲0.2049.49 ▲9.72
Dashboard /wp-admin2,206 ▲185.86 ▲0.9899.69 ▼17.7948.56 ▲2.48
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0540.49 ▲3.8236.58 ▲3.16
Add New Post /wp-admin/post-new.php1,533 ▲1423.35 ▲0.13661.56 ▲21.1155.65 ▲2.94
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0196.53 ▼13.9643.77 ▼0.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Looking good! No server-side errors or output on direct access of PHP files

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 86% 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
2 plugin tags: woocommerce, order again

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

This is the main PHP file of "WooCommerce Repeat Order Button" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("repeat-order-button-for-woocommerce.php" instead of "woocommerce-repeat-order-button.php")
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112815

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.80
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.16MB with 0.14MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png164.63KB23.99KB▼ 85.43%