72% responsive-menu-card-price-list-items

Code Review | Responsive Menu Card | Price List Items

WordPress plugin Responsive Menu Card | Price List Items scored72%from 54 tests.

About plugin

  • Plugin page: responsive-menu-c...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.4
  • WordPress version: 6.3.1
  • First release: Nov 24, 2015
  • Latest release: Apr 27, 2017
  • Number of updates: 34
  • Update frequency: every 15.3 days
  • Top authors: mgulzar (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /9,903 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
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼5.83ms] Passed 4 tests

Server-side resources used by Responsive Menu Card | Price List Items
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.82 ▼1.99
Dashboard /wp-admin3.45 ▲0.1547.03 ▼10.67
Posts /wp-admin/edit.php3.57 ▲0.2150.14 ▲2.59
Add New Post /wp-admin/post-new.php6.06 ▲0.1791.47 ▼13.24
Media Library /wp-admin/upload.php3.38 ▲0.1538.67 ▲2.57
Add New Item /wp-admin/post-new.php?post_type=menu3.5160.19
All Menu /wp-admin/edit.php?post_type=menu3.4240.80
Categories Sorting /wp-admin/edit.php?post_type=menu&page=menucard_cat_order3.3631.95
Items Sorting /wp-admin/edit.php?post_type=menu&page=menucard_order3.3735.39
Settings /wp-admin/edit.php?post_type=menu&page=menucard_setting3.4239.05
Categories /wp-admin/edit-tags.php?taxonomy=menu_cat&post_type=menu3.3738.07

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Responsive Menu Card | Price List Items
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲20713.75 ▼0.916.12 ▲3.8943.21 ▼4.07
Dashboard /wp-admin2,261 ▲845.82 ▲0.1290.26 ▼9.1441.64 ▼3.56
Posts /wp-admin/edit.php2,168 ▲682.44 ▲0.3339.83 ▲1.1732.06 ▼5.04
Add New Post /wp-admin/post-new.php1,579 ▲5123.81 ▲0.58675.72 ▲21.4438.05 ▼19.50
Media Library /wp-admin/upload.php1,463 ▲694.50 ▲0.32102.00 ▲3.1740.99 ▲0.87
Add New Item /wp-admin/post-new.php?post_type=menu2,3618.11195.4465.87
All Menu /wp-admin/edit.php?post_type=menu1,1462.3337.3030.77
Categories Sorting /wp-admin/edit.php?post_type=menu&page=menucard_cat_order9942.3331.2137.43
Items Sorting /wp-admin/edit.php?post_type=menu&page=menucard_order1,0102.2032.0730.33
Settings /wp-admin/edit.php?post_type=menu&page=menucard_setting2,3012.7981.7939.35
Categories /wp-admin/edit-tags.php?taxonomy=menu_cat&post_type=menu1,3572.1635.4533.50

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/responsive-menu-card-price-list-items/assets/css/theme.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_term() in wp-content/plugins/responsive-menu-card-price-list-items/templates/rmc-template-category-layout.php:3
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/responsive-menu-card-price-list-items/templates/rmc-template-category-layout.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rmc_get_menu_meta() in wp-content/plugins/responsive-menu-card-price-list-items/templates/rmc-template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/responsive-menu-card-price-list-items/templates/rmc-settings.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/responsive-menu-card-price-list-items/templates/rmc-category-order.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rmc_get_menu_meta() in wp-content/plugins/responsive-menu-card-price-list-items/templates/rmc-menu-order.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=menu_cat&post_type=menu
    • > Network (severe)
    wp-content/plugins/responsive-menu-card-price-list-items/assets/js/jquery.main.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: category items filter, price list items, custom post order, responsive menu card, price table...

responsive-menu-card-price-list-items/responsive-menu-card.php 85% from 13 tests

"Responsive Menu Card | Price List Items" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 194 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("responsive-menu-card-price-list-items.php" instead of "responsive-menu-card.php")

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,853 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12661441,259
CSS201454
JavaScript2196140

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity12.20
▷ Minimum class complexity3.00
▷ Maximum class complexity39.00
Average method complexity2.81
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/rmc-logo.png14.61KB8.93KB▼ 38.90%
assets/images/rmc-icon.png1.38KB0.78KB▼ 43.36%