68% yummly-rich-recipes

Code Review | Yummly Rich Recipes

WordPress plugin Yummly Rich Recipes scored68%from 54 tests.

About plugin

  • Plugin page: yummly-rich-recipes
  • Plugin version: 4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.2
  • WordPress version: 6.3.1
  • First release: Dec 12, 2014
  • Latest release: Mar 29, 2016
  • Number of updates: 18
  • Update frequency: every 26.3 days
  • Top authors: Yummly (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

700+ active /17,483 total downloads

Benchmarks

Plugin footprint 65% 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.16MB] [CPU: ▼19.50ms] Passed 4 tests

An overview of server-side resources used by Yummly Rich Recipes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2344.25 ▲2.62
Dashboard /wp-admin3.38 ▲0.0433.05 ▼32.17
Posts /wp-admin/edit.php3.63 ▲0.2852.43 ▲1.40
Add New Post /wp-admin/post-new.php6.10 ▲0.2185.45 ▼38.37
Media Library /wp-admin/upload.php3.39 ▲0.1631.79 ▼8.87

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 23 new files
Database: 1 new table, 45 new options
New tables
wp_amd_yrecipe_recipes
New WordPress options
yrecipe_notes_label_hide
yrecipe_rating_label
yrecipe_print_link_hide
yrecipe_ingredient_list_type
yrecipe_prep_time_label
yrecipe_calories_label
widget_recent-comments
yrecipe_image_width
theysaidso_admin_options
yummly_recipe_button_hide
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Yummly Rich Recipes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.35 ▼0.271.92 ▲0.2442.35 ▼3.98
Dashboard /wp-admin2,222 ▲455.64 ▼0.0685.98 ▼14.1040.61 ▼3.64
Posts /wp-admin/edit.php2,125 ▲251.95 ▼0.0735.34 ▼2.9332.76 ▼3.73
Add New Post /wp-admin/post-new.php1,548 ▲2223.17 ▼0.43675.00 ▲9.4755.64 ▼9.96
Media Library /wp-admin/upload.php1,419 ▲164.28 ▲0.0899.90 ▼1.7542.04 ▼5.10

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
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_amd_yrecipe_recipes
  • Zombie WordPress options were found after uninstall: 45 options
    • yrecipe_printed_permalink_hide
    • db_upgraded
    • yrecipe_fat_label
    • yrecipe_ingredient_label_hide
    • yrecipe_print_link_hide
    • theysaidso_admin_options
    • yrecipe_notes_label
    • yrecipe_rating_label_hide
    • yrecipe_prep_time_label
    • yrecipe_prep_time_label_hide
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/yummly-rich-recipes/yrecipe.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/yummly-rich-recipes/includes/style.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The Yummly Rich Recipes plugin icon appears as a Yum Button on the visual editor tool.), #2 (The Yummly Rich Recipes plugin makes it easy to enter the basic information for recipes: the title, the ingredients and the preparation instructions.), #3 (Easily update your recipes by clicking on the Yum Button in your editor again.), #4 (If you you would like to add even more information about your recipe, such as the serving size or your rating of the recipe, simply click the "More Options" link!), #5 (Once you click the "Add Recipe" button, a placeholder image will be inserted into your post where your recipe will go. If you need to edit your recipe, simply click on the Yum icon in the visual editor toolbar (you do not need to click on the recipe placeholder as you did in previous releases of the plugin).), #6 (As soon as you publish or preview your post, your recipe will be available with all your microformats... without any additional work from you!)
  • Tags: There are too many tags (17 tag instead of maximum 10)
Please take inspiration from this readme.txt

yummly-rich-recipes/yrecipe.php 92% from 13 tests

"Yummly Rich Recipes" version 4.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("yummly-rich-recipes.php" instead of "yrecipe.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,575 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP2144901,208
CSS45847282
JavaScript2306685

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.40MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png27.17KB9.92KB▼ 63.47%
screenshot-2.png96.93KB31.51KB▼ 67.49%
images/yum_button_round.png6.38KB3.11KB▼ 51.24%
screenshot-3.png23.82KB8.81KB▼ 63.03%
screenshot-6.png82.97KB25.32KB▼ 69.49%