78% shop-menu

Code Review | Shop Menu

WordPress plugin Shop Menu scored78%from 54 tests.

About plugin

  • Plugin page: shop-menu
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Jun 12, 2013
  • Latest release: Aug 3, 2017
  • Number of updates: 12
  • Update frequency: every 128.3 days
  • Top authors: hidaka.bizplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /6,725 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 gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼9.36ms] Passed 4 tests

A check of server-side resources used by Shop Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3337.13 ▼3.10
Dashboard /wp-admin3.65 ▲0.3146.50 ▼15.25
Posts /wp-admin/edit.php3.71 ▲0.3549.61 ▲3.36
Add New Post /wp-admin/post-new.php6.17 ▲0.2884.94 ▼22.43
Media Library /wp-admin/upload.php3.51 ▲0.2841.00 ▲6.46
商品カテゴリ /wp-admin/edit-tags.php?taxonomy=menu_type&post_type=shop_menu3.5133.95
設定 /wp-admin/edit.php?post_type=shop_menu&page=shop-menu/shop-menu.php3.4831.62
商品一覧 /wp-admin/edit.php?post_type=shop_menu3.5636.40
Add New /wp-admin/post-new.php?post_type=shop_menu3.7348.75

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

Browser metrics Passed 4 tests

An overview of browser requirements for Shop Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲20313.58 ▼1.108.34 ▲6.4941.03 ▼2.33
Dashboard /wp-admin2,235 ▲474.86 ▼1.03106.53 ▼7.4346.98 ▼4.95
Posts /wp-admin/edit.php2,124 ▲322.03 ▲0.0639.47 ▼0.1140.71 ▲10.37
Add New Post /wp-admin/post-new.php1,572 ▲3923.08 ▼0.28674.14 ▲6.6358.29 ▲8.16
Media Library /wp-admin/upload.php1,426 ▲354.22 ▼0.0199.49 ▲3.0447.53 ▲6.19
商品カテゴリ /wp-admin/edit-tags.php?taxonomy=menu_type&post_type=shop_menu1,2742.1428.9747.76
設定 /wp-admin/edit.php?post_type=shop_menu&page=shop-menu/shop-menu.php9182.2022.7467.60
商品一覧 /wp-admin/edit.php?post_type=shop_menu1,1051.9430.7343.01
Add New /wp-admin/post-new.php?post_type=shop_menu2,4017.78176.0381.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • shop_memu_options

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

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/shop-menu/shop-menu-view.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: mb in wp-content/plugins/shop-menu/meta-view.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to a member function the_field() on null in wp-content/plugins/shop-menu/meta-view.php:5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/shop-menu/shop-menu-view.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'SM' not found in wp-content/plugins/shop-menu/admin-view.php:19
    • > PHP Notice
      Trying to get property 'items' of non-object in wp-content/plugins/shop-menu/shop-menu-view.php on line 3
    • > PHP Notice
      Undefined variable: info in wp-content/plugins/shop-menu/shop-menu-view.php on line 16
    • > PHP Notice
      Undefined variable: info in wp-content/plugins/shop-menu/shop-menu-view.php on line 3
    • > PHP Notice
      Trying to get property 'has_next' of non-object in wp-content/plugins/shop-menu/shop-menu-view.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/shop-menu/shop-menu.php:61

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

shop-menu/shop-menu.php Passed 13 tests

The entry point to "Shop Menu" version 1.5.0 is a PHP file that has certain tags in its header comment area
69 characters long description:
商品一覧、メニュー一覧を作成するプラグインです

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,999 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP74858441,867
CSS13073
JavaScript10046
Markdown24013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity42.71
▷ Minimum class complexity2.00
▷ Maximum class complexity242.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods108
▷ Static methods1312.04%
▷ Public methods9991.67%
▷ Protected methods65.56%
▷ Private methods32.78%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants22
▷ Global constants1881.82%
▷ Class constants418.18%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image/noimage.png1.62KB0.70KB▼ 56.70%