84% woo-out-of-stock-last

Code Review | WooCommerce Out Of Stock Last

WordPress plugin WooCommerce Out Of Stock Last scored84%from 54 tests.

About plugin

  • Plugin page: woo-out-of-stock-...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 26, 2018
  • Latest release: Nov 5, 2022
  • Number of updates: 10
  • Update frequency: every 165.4 days
  • Top authors: pileggi (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

700+ active /2,281 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.00MB] [CPU: ▼3.40ms] Passed 4 tests

Server-side resources used by WooCommerce Out Of Stock Last
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.45 ▼3.41
Dashboard /wp-admin3.31 ▲0.0153.57 ▲3.82
Posts /wp-admin/edit.php3.36 ▲0.0050.90 ▲2.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.67 ▼16.29
Media Library /wp-admin/upload.php3.23 ▲0.0045.48 ▲4.74

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Out Of Stock Last
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.35 ▼0.051.97 ▲0.3145.26 ▲1.26
Dashboard /wp-admin2,189 ▲95.54 ▼0.1286.17 ▼7.0641.82 ▲1.43
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0335.49 ▼0.8934.70 ▼0.85
Add New Post /wp-admin/post-new.php1,526 ▼923.70 ▲5.44708.08 ▲22.0758.98 ▼6.65
Media Library /wp-admin/upload.php1,400 ▼04.13 ▲0.02130.14 ▲15.1047.07 ▼0.39

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-out-of-stock-last/woocommerce-out-of-stock-last.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% 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
3 plugin tags: last, out of stock, woocommerce

woo-out-of-stock-last/woocommerce-out-of-stock-last.php 92% from 13 tests

The entry point to "WooCommerce Out Of Stock Last" version 2.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-out-of-stock-last.php" instead of "woocommerce-out-of-stock-last.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
Good job! No executable or dangerous file extensions detected9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1289

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.00
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin