62% wp-recipe-maker

Code Review | WP Recipe Maker

WordPress plugin WP Recipe Maker scored62%from 54 tests.

About plugin

  • Plugin page: wp-recipe-maker
  • Plugin version: 9.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2016
  • Latest release: Nov 29, 2023
  • Number of updates: 291
  • Update frequency: every 9.1 days
  • Top authors: BrechtVds (100%)

Code review

54 tests

User reviews

287 reviews

Install metrics

50,000+ active /2,440,180 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.86MB] [CPU: ▲40.41ms] 50% from 4 tests

An overview of server-side resources used by WP Recipe Maker
Please have a look at the following items
  • RAM: Total memory usage must be kept under 10MB (currently 10.39MB on /wp-admin/admin.php?page=wprm_faq)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.86MB on /wp-admin/admin.php?page=wprm_find_ingredient_units)
PageMemory (MB)CPU Time (ms)
Home /8.18 ▲4.7271.31 ▲28.14
Dashboard /wp-admin9.54 ▲6.2490.09 ▲42.70
Posts /wp-admin/edit.php9.60 ▲6.2492.42 ▲40.38
Add New Post /wp-admin/post-new.php12.81 ▲6.92150.03 ▲57.52
Media Library /wp-admin/upload.php9.47 ▲6.2485.24 ▲50.40
Settings /wp-admin/admin.php?page=wprm_settings9.89103.23
FAQ & Support /wp-admin/admin.php?page=wprm_faq10.3994.38
Health Check /wp-admin/admin.php?page=wprm_health_check9.81105.22
Import Recipes /wp-admin/admin.php?page=wprm_import9.8185.06
Finding Parents /wp-admin/admin.php?page=wprm_finding_parents9.8185.75
Importing Recipes /wp-admin/admin.php?page=wprm_importing9.8183.90
Creating Lists /wp-admin/admin.php?page=wprm_create_lists9.8188.36
Upgrade WPRM /wp-admin/admin.php?page=wprm_addons9.8183.12
Anonymize Ratings /wp-admin/admin.php?page=wprm_anonymize_ratings9.8193.40
Find Ingredient Units /wp-admin/admin.php?page=wprm_find_ingredient_units9.8183.92

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 959 new files
Database: 2 new tables, 11 new options
New tables
wp_wprm_ratings
wp_wprm_analytics
New WordPress options
wprm_analytics_db_version
wprm_rating_db_version
wprm_course_children
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
wprm_migrated_to_version
widget_theysaidso_widget
wprm_cuisine_children
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Recipe Maker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲12814.65 ▼0.1316.62 ▲15.0035.65 ▼11.95
Dashboard /wp-admin2,250 ▲725.57 ▼0.1497.22 ▼10.6443.45 ▲0.01
Posts /wp-admin/edit.php2,155 ▲521.97 ▼0.0141.10 ▲0.4236.58 ▼2.47
Add New Post /wp-admin/post-new.php6,679 ▲5,15326.27 ▲3.05958.90 ▲301.2439.81 ▼14.69
Media Library /wp-admin/upload.php1,455 ▲554.24 ▲0.06115.10 ▲18.9549.26 ▲8.11
Settings /wp-admin/admin.php?page=wprm_settings5,14313.68385.55140.42
FAQ & Support /wp-admin/admin.php?page=wprm_faq1,35511.04219.1037.46
Health Check /wp-admin/admin.php?page=wprm_health_check1,5878.77170.7730.39
Import Recipes /wp-admin/admin.php?page=wprm_import1,5638.57156.8027.14
Finding Parents /wp-admin/admin.php?page=wprm_finding_parents1,5848.86174.2729.46
Importing Recipes /wp-admin/admin.php?page=wprm_importing1,5638.57167.0627.93
Creating Lists /wp-admin/admin.php?page=wprm_create_lists1,5838.57179.9128.20
Upgrade WPRM /wp-admin/admin.php?page=wprm_addons1,7319.36169.1534.93
Anonymize Ratings /wp-admin/admin.php?page=wprm_anonymize_ratings1,5809.61165.1528.33
Find Ingredient Units /wp-admin/admin.php?page=wprm_find_ingredient_units1,5868.70175.3430.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_wprm_analytics
    • wp_wprm_ratings
  • Zombie WordPress options were found after uninstall: 11 options
    • wprm_course_children
    • can_compress_scripts
    • wprm_rating_db_version
    • db_upgraded
    • wprm_migrated_to_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • wprm_cuisine_children
    • wprm_analytics_db_version
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-recipe-maker/templates/admin/settings.php
  • 279× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-recipe-maker/includes/public/class-wprm-analytics-database.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-recipe-maker/includes/public/api/class-wprm-api-manage-taxonomies.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/wp-recipe-maker/includes/admin/migrations/wprm-1-7-1-ingredient-ids.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-recipe-maker/includes/public/class-wprm-metadata-rank-math.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'WPRM_Template_Shortcode' not found in wp-content/plugins/wp-recipe-maker/includes/public/shortcodes/general/class-wprm-sc-link.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-recipe-maker/templates/settings/group-template-legacy.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WPRM_Import' not found in wp-content/plugins/wp-recipe-maker/includes/admin/import/class-wprm-import-bigoven.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-recipe-maker/includes/admin/classic-editor/class-wprm-shortcode-preview.php:28
    • > PHP Warning
      opendir(WPRM_DIRincludes/public/shortcodes/recipe): failed to open dir: No such file or directory in wp-content/plugins/wp-recipe-maker/includes/public/class-wprm-template-shortcodes.php on line 163
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-recipe-maker/includes/public/class-wprm-recipe-revisions.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wprm_settings
    • > Deprecation (warning) in unknown
    /wp-content/plugins/wp-recipe-maker/dist/admin-settings.js?ver=9.0.1 17 Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: recipes, food, cooking, ingredients, json-ld...

wp-recipe-maker/wp-recipe-maker.php Passed 13 tests

This is the main PHP file of "WP Recipe Maker" version 9.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
124 characters long description:
The easy and user-friendly recipe plugin for everyone. Automatic JSON-LD metadata for better SEO will get you more visitors!

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin84,717 lines of code in 911 files:
LanguageFilesBlank linesComment linesLines of code
PHP2977,11314,12937,217
JavaScript3112,9561,45923,532
PO File96,5728,03216,226
Sass97993485,756
JSON300696
CSS342812535
HTML1700320
SVG14100203
Markdown1780156
XML10076

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 125)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity27.38
▷ Minimum class complexity1.00
▷ Maximum class complexity199.00
Average method complexity4.79
▷ Minimum method complexity1.00
▷ Maximum method complexity125.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes203
▷ Abstract classes10.49%
▷ Concrete classes20299.51%
▷ Final classes00.00%
Methods1,382
▷ Static methods82459.62%
▷ Public methods1,27792.40%
▷ Protected methods241.74%
▷ Private methods815.86%
Functions35
▷ Named functions720.00%
▷ Anonymous functions2880.00%
Constants44
▷ Global constants2965.91%
▷ Class constants1534.09%
▷ Public constants15100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
15 PNG files occupy 2.47MB with 1.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/faq/creating/elementor-widget.png119.25KB35.11KB▼ 70.56%
assets/images/faq/creating/wordpress-com-admin-link.png57.28KB13.95KB▼ 75.64%
assets/images/faq/creating/manage-overview.png650.22KB189.53KB▼ 70.85%
dist/assets/9db239b0b8817856fa53552be937ab40.png27.63KB11.83KB▼ 57.18%
assets/images/faq/creating/classic-editor-buttons.png300.10KB88.33KB▼ 70.57%