89% single-page-restaurant-menu-for-woocommerce

Code Review | Single Page Restaurant Menu for WooCommerce

WordPress plugin Single Page Restaurant Menu for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: single-page-resta...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Jul 22, 2020
  • Latest release: Dec 30, 2022
  • Number of updates: 12
  • Update frequency: every 78.7 days
  • Top authors: Ali Kazim (75%)ahmedabbas90 (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,748 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: ▼2.26ms] Passed 4 tests

This is a short check of server-side resources used by Single Page Restaurant Menu for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.09 ▼2.15
Dashboard /wp-admin3.31 ▲0.0046.08 ▼0.05
Posts /wp-admin/edit.php3.36 ▲0.0050.35 ▲2.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.87 ▼7.36
Media Library /wp-admin/upload.php3.23 ▲0.0033.81 ▲0.54

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Single Page Restaurant Menu for WooCommerce: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼0.984.01 ▲2.1942.08 ▼1.02
Dashboard /wp-admin2,200 ▲125.83 ▲0.90106.15 ▼2.6039.06 ▼2.16
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0340.49 ▼1.0235.87 ▼0.14
Add New Post /wp-admin/post-new.php1,514 ▼2817.77 ▼0.54646.92 ▲51.1552.99 ▲2.74
Media Library /wp-admin/upload.php1,388 ▼04.26 ▲0.0194.13 ▼10.3041.42 ▼3.08

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 were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === single-page-restaurant-menu-for-woocommerce === )
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #5 in single-page-restaurant-menu-for-woocommerce/assets to your readme.txt
You can look at the official readme.txt

single-page-restaurant-menu-for-woocommerce/sprm.bootstrap.php 85% from 13 tests

The primary PHP file in "Single Page Restaurant Menu for WooCommerce" version 1.0.5 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("single-page-restaurant-menu-for-woocommerce.php" instead of "sprm.bootstrap.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin1,948 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP16189150828
CSS216842770
JavaScript26521262
PO File1323288

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.00
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods1343.33%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.08MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/empty-cart-placeholder.png65.47KB19.08KB▼ 70.85%
assets/intelvue-icon.png21.22KB1.28KB▼ 93.99%