84% sku-for-woocommerce-bookings

Code Review | SKU for WooCommerce Bookings

WordPress plugin SKU for WooCommerce Bookings scored84%from 54 tests.

About plugin

  • Plugin page: sku-for-woocommer...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Jun 30, 2020
  • Latest release: Jun 30, 2020
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: Rynald0s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /518 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.65ms] Passed 4 tests

An overview of server-side resources used by SKU for WooCommerce Bookings
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.0543.98 ▼2.90
Dashboard /wp-admin3.61 ▼0.0351.91 ▼16.90
Posts /wp-admin/edit.php3.72 ▲0.0451.83 ▼0.88
Add New Post /wp-admin/post-new.php6.19 ▲0.0498.80 ▼13.90
Media Library /wp-admin/upload.php3.53 ▲0.0441.67 ▲1.58

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by SKU for WooCommerce Bookings
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.73 ▲0.371.75 ▼0.2443.75 ▼0.32
Dashboard /wp-admin2,198 ▲215.65 ▲0.0387.89 ▼4.7538.81 ▼2.72
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0342.57 ▲5.8536.26 ▲1.68
Add New Post /wp-admin/post-new.php1,545 ▲1923.23 ▲5.55658.29 ▼13.2056.38 ▼4.45
Media Library /wp-admin/upload.php1,394 ▼64.21 ▲0.07101.44 ▼14.7144.26 ▼6.28

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sku-for-woocommerce-bookings/sku-search-for-wc-bookings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/sku-for-woocommerce-bookings/sku-for-wc-bookings.php:14

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

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
6 plugin tags: booking sku, woocommerce, add sku to bookable product, woocommerce bookings, sku...

sku-for-woocommerce-bookings/sku-for-wc-bookings.php 92% from 13 tests

This is the main PHP file of "SKU for WooCommerce Bookings" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sku-for-woocommerce-bookings.php" instead of "sku-for-wc-bookings.php")

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
Everything looks great! No dangerous files found in this plugin138 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35548138

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.70
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin