78% pizza-builder-for-woocommerce

Code Review | Pizza builder for WooCommerce

WordPress plugin Pizza builder for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: pizza-builder-for...
  • Plugin version: 1.1.5
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3
  • WordPress version: 6.3.1
  • First release: Dec 24, 2021
  • Latest release: Aug 11, 2023
  • Number of updates: 23
  • Update frequency: every 25.9 days
  • Top authors: wsjrcatarri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,426 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Pizza builder for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.62 ▼0.43
Dashboard /wp-admin3.31 ▲0.0047.43 ▼5.95
Posts /wp-admin/edit.php3.36 ▲0.0048.09 ▼5.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.97 ▼9.25
Media Library /wp-admin/upload.php3.23 ▲0.0034.38 ▲2.72

Server storage [IO: ▲0.96MB] [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: 35 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pizza builder for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.28 ▼1.471.74 ▼0.2940.24 ▼6.35
Dashboard /wp-admin2,206 ▲185.83 ▼0.03107.90 ▼1.6843.19 ▼2.04
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0139.74 ▲3.3334.85 ▼0.67
Add New Post /wp-admin/post-new.php1,528 ▲1418.14 ▲0.65601.23 ▼12.0456.22 ▼9.57
Media Library /wp-admin/upload.php1,382 ▼94.20 ▼0.0996.81 ▼6.4840.52 ▼3.49

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pizza-builder-for-woocommerce/templates/email/pizza-order-meta.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Product' not found in wp-content/plugins/pizza-builder-for-woocommerce/includes/class-pizza-product-builder.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
5 plugin tags: pizza, pizza woocommerce, food, woocommerce components, restaurant

pizza-builder-for-woocommerce/ev-pizza.php 92% from 13 tests

"Pizza builder for WooCommerce" version 1.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pizza-builder-for-woocommerce.php" instead of "ev-pizza.php")

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 plugin7,051 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111251274,454
PHP173331392,253
CSS56410341
SVG1203

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity34.33
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity5.76
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods63
▷ Static methods34.76%
▷ Public methods63100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1285.71%
▷ Anonymous functions214.29%
Constants2
▷ Global constants2100.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 files were detected