79% yummy-recipes

Code Review | Yummy Recipes

WordPress plugin Yummy Recipes scored79%from 54 tests.

About plugin

  • Plugin page: yummy-recipes
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Jun 11, 2022
  • Latest release: Aug 25, 2022
  • Number of updates: 16
  • Update frequency: every 4.8 days
  • Top authors: nordwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,255 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲5.21MB] [CPU: ▲31.14ms] 50% from 4 tests

A check of server-side resources used by Yummy Recipes
Please take the time to fix the following items
  • RAM: You should keep total memory usage under 10MB (currently 10.45MB on /wp-admin/post-new.php?post_type=yummy_recipe)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.21MB on /wp-admin/edit.php?post_type=yummy_recipe)
PageMemory (MB)CPU Time (ms)
Home /8.78 ▲5.3275.56 ▲32.61
Dashboard /wp-admin8.80 ▲5.5083.37 ▲29.05
Posts /wp-admin/edit.php8.81 ▲5.4581.04 ▲29.31
Add New Post /wp-admin/post-new.php10.45 ▲4.56125.17 ▲33.59
Media Library /wp-admin/upload.php8.80 ▲5.5875.94 ▲40.63
Courses /wp-admin/edit-tags.php?taxonomy=yummy_course&post_type=yummy_recipe8.8767.87
Cuisines /wp-admin/edit-tags.php?taxonomy=yummy_cuisine&post_type=yummy_recipe8.8767.03
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius8.8168.08
Collections /wp-admin/edit-tags.php?taxonomy=yummy_collection&post_type=yummy_recipe8.8772.58
Tags /wp-admin/edit-tags.php?taxonomy=yummy_recipe_tag&post_type=yummy_recipe8.8766.26
Special Diets /wp-admin/edit-tags.php?taxonomy=yummy_special_diet&post_type=yummy_recipe8.8765.30
Add New Recipe /wp-admin/post-new.php?post_type=yummy_recipe10.45113.47
Difficulties /wp-admin/edit-tags.php?taxonomy=yummy_difficulty&post_type=yummy_recipe8.8778.49
Recipes /wp-admin/edit.php?post_type=yummy_recipe8.8168.03

Server storage [IO: ▲3.31MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 227 new files
Database: no new tables, 13 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
yummy_options
db_upgraded
yummy_default_thumbnail_image_url
fs_debug_mode
can_compress_scripts
fs_active_plugins
theysaidso_admin_options
yummy_default_thumbnail_image_id
...

Browser metrics Passed 4 tests

Checking browser requirements for Yummy Recipes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲12014.24 ▼0.411.59 ▼0.1931.01 ▼18.61
Dashboard /wp-admin2,282 ▲1055.67 ▲0.0192.60 ▼11.9941.60 ▼1.82
Posts /wp-admin/edit.php2,188 ▲881.99 ▲0.0236.14 ▲1.1736.53 ▲1.95
Add New Post /wp-admin/post-new.php6,289 ▲4,76321.43 ▼1.44847.27 ▲170.6470.19 ▲13.75
Media Library /wp-admin/upload.php1,521 ▲1214.31 ▲0.0899.07 ▼3.6445.27 ▲3.65
Courses /wp-admin/edit-tags.php?taxonomy=yummy_course&post_type=yummy_recipe1,3992.2830.7931.90
Cuisines /wp-admin/edit-tags.php?taxonomy=yummy_cuisine&post_type=yummy_recipe1,4022.2826.7134.41
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius1,1371.7023.3528.80
Collections /wp-admin/edit-tags.php?taxonomy=yummy_collection&post_type=yummy_recipe1,4022.2927.8635.36
Tags /wp-admin/edit-tags.php?taxonomy=yummy_recipe_tag&post_type=yummy_recipe1,3742.2929.2632.69
Special Diets /wp-admin/edit-tags.php?taxonomy=yummy_special_diet&post_type=yummy_recipe1,4022.2833.2636.73
Add New Recipe /wp-admin/post-new.php?post_type=yummy_recipe6,57821.48993.5854.95
Difficulties /wp-admin/edit-tags.php?taxonomy=yummy_difficulty&post_type=yummy_recipe1,3962.2928.3535.08
Recipes /wp-admin/edit.php?post_type=yummy_recipe1,2481.9634.9833.73

Uninstaller [IO: ▲0.49MB] [DB: ▲0.01MB] 50% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/yummy-recipes/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 13 options in the database
    • fs_debug_mode
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • fs_gdpr
    • fs_active_plugins
    • widget_recent-posts
    • widget_recent-comments
    • yummy_options
    • theysaidso_admin_options
    • ...

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: food, cooking, microformats, recipe block, recipe...

yummy-recipes/yummy-recipes.php Passed 13 tests

"Yummy Recipes" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
101 characters long description:
Yummy Recipes is a recipe plugin for WordPress. It helps you to share your tasty recipes to everyone.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin35,936 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
PHP1458,11617,37633,878
JavaScript121781091,052
CSS141947997
SVG9009

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity77.83
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,224
▷ Static methods22518.38%
▷ Public methods88472.22%
▷ Protected methods151.23%
▷ Private methods32526.55%
Functions159
▷ Named functions15597.48%
▷ Anonymous functions42.52%
Constants126
▷ Global constants10180.16%
▷ Class constants2519.84%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/yummy-recipes.png9.16KB5.26KB▼ 42.58%
assets/images/yummy-pattern.png74.64KB37.74KB▼ 49.44%