89% restaurant-for-woocommerce

Code Review | Restaurant for WooCommerce

WordPress plugin Restaurant for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: restaurant-for-wo...
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4+
  • WordPress version: 6.3.1
  • First release: May 5, 2021
  • Latest release: Jul 30, 2022
  • Number of updates: 5
  • Update frequency: every 90.2 days
  • Top authors: jodhavishalsingh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /697 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Restaurant for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.87 ▼1.95
Dashboard /wp-admin3.31 ▲0.0048.30 ▼3.96
Posts /wp-admin/edit.php3.36 ▲0.0044.87 ▼4.42
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.51 ▼19.31
Media Library /wp-admin/upload.php3.23 ▲0.0040.81 ▲3.76

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Restaurant for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.131.66 ▼0.1540.61 ▼2.18
Dashboard /wp-admin2,195 ▲215.53 ▼0.0486.10 ▼0.3738.77 ▼6.38
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0139.89 ▲3.0035.93 ▼0.96
Add New Post /wp-admin/post-new.php1,526 ▼223.06 ▼0.12652.29 ▼4.1259.75 ▲6.25
Media Library /wp-admin/upload.php1,394 ▼64.14 ▼0.1398.97 ▼4.2442.59 ▼7.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt is a good inspiration

restaurant-for-woocommerce/restaurant-for-woocommerce.php 92% from 13 tests

The entry point to "Restaurant for WooCommerce" version 1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
There were no executable files found in this plugin5,503 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43742242,470
CSS4203482,034
PHP59918977
SVG21022

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity47.33
▷ Minimum class complexity10.00
▷ Maximum class complexity70.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods39
▷ Static methods1435.90%
▷ Public methods3897.44%
▷ Protected methods00.00%
▷ Private methods12.56%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.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
There are no PNG files in this plugin