77% recipepress-reloaded

Code Review | RecipePress Reloaded

WordPress plugin RecipePress Reloaded scored77%from 54 tests.

About plugin

  • Plugin page: recipepress-reloaded
  • Plugin version: 2.12.0
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.4.0
  • WordPress version: 6.3.1
  • First release: Nov 11, 2012
  • Latest release: Nov 28, 2023
  • Number of updates: 309
  • Update frequency: every 13.1 days
  • Top authors: dasmaeh (68.61%)w33zy (31.72%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /22,231 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲3.72MB] [CPU: ▲24.45ms] Passed 4 tests

A check of server-side resources used by RecipePress Reloaded
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.98 ▲3.5263.02 ▲23.15
Dashboard /wp-admin7.12 ▲3.8276.98 ▲26.09
Posts /wp-admin/edit.php7.17 ▲3.8279.51 ▲31.99
Add New Post /wp-admin/post-new.php9.98 ▲4.09112.75 ▲16.82
Media Library /wp-admin/upload.php6.97 ▲3.7462.67 ▲31.72
Difficulties /wp-admin/edit-tags.php?taxonomy=rpr_difficulty&post_type=rpr_recipe6.9760.39
Seasons /wp-admin/edit-tags.php?taxonomy=rpr_season&post_type=rpr_recipe6.9758.15
Ingredients /wp-admin/edit-tags.php?taxonomy=rpr_ingredient&post_type=rpr_recipe7.0663.52
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=rpr_recipe6.9759.19
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=rpr_recipe7.0063.61
New Recipe /wp-admin/post-new.php?post_type=rpr_recipe7.3187.32
Welcome /wp-admin/index.php?page=rpr-welcome-screen6.9462.75
All Recipes /wp-admin/edit.php?post_type=rpr_recipe7.1667.70
Cuisines /wp-admin/edit-tags.php?taxonomy=rpr_cuisine&post_type=rpr_recipe6.9868.69
Extensions /wp-admin/edit.php?post_type=rpr_recipe&page=rpr_extensions6.9962.99

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 421 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-posts
widget_rpr-recipe-tag-cloud
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_rpr-recipe-calendar
recipepress_settings
widget_rpr-recent-recipes
widget_recent-comments
can_compress_scripts
...

Browser metrics Passed 4 tests

A check of browser resources used by RecipePress Reloaded
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,998 ▲25113.77 ▼0.528.21 ▲6.4835.88 ▼7.41
Dashboard /wp-admin2,278 ▲1015.54 ▼0.1496.41 ▲0.9344.41 ▲1.28
Posts /wp-admin/edit.php2,409 ▲3092.13 ▲0.1839.61 ▼0.3631.93 ▼8.11
Add New Post /wp-admin/post-new.php1,821 ▲29223.06 ▼0.24687.04 ▲94.1353.81 ▲0.81
Media Library /wp-admin/upload.php1,569 ▲1664.19 ▼0.0695.00 ▼6.6342.65 ▼2.12
Difficulties /wp-admin/edit-tags.php?taxonomy=rpr_difficulty&post_type=rpr_recipe1,5581.8335.7332.21
Seasons /wp-admin/edit-tags.php?taxonomy=rpr_season&post_type=rpr_recipe1,5581.8334.3531.03
Ingredients /wp-admin/edit-tags.php?taxonomy=rpr_ingredient&post_type=rpr_recipe1,7913.4771.4833.03
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=rpr_recipe1,6281.8733.9730.32
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=rpr_recipe1,7641.8332.9733.59
New Recipe /wp-admin/post-new.php?post_type=rpr_recipe4,60910.64269.11106.70
Welcome /wp-admin/index.php?page=rpr-welcome-screen8751.9628.3829.64
All Recipes /wp-admin/edit.php?post_type=rpr_recipe1,5333.9060.7630.00
Cuisines /wp-admin/edit-tags.php?taxonomy=rpr_cuisine&post_type=rpr_recipe1,5581.8533.4630.13
Extensions /wp-admin/edit.php?post_type=rpr_recipe&page=rpr_extensions1,2205.5596.5065.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 12 options
    • can_compress_scripts
    • widget_rpr-recipe-taxonomy-list
    • widget_rpr-recipe-tag-cloud
    • widget_rpr-recipe-calendar
    • widget_theysaidso_widget
    • recipepress_settings
    • widget_recent-posts
    • theysaidso_admin_options
    • category_children
    • widget_rpr-recent-recipes
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/recipepress-reloaded/inc/extensions/rpr-recipe-carousel/includes/recipe-carousel.php
    • > /wp-content/plugins/recipepress-reloaded/inc/admin/views/html-recipepress-admin-display.php
    • > /wp-content/plugins/recipepress-reloaded/inc/frontend/views/html-recipepress-public-display.php
    • > /wp-content/plugins/recipepress-reloaded/inc/admin/views/rpr-welcome-screen.php
    • > /wp-content/plugins/recipepress-reloaded/inc/extensions/rpr-favorites/includes/favorites-button.php
    • > /wp-content/plugins/recipepress-reloaded/inc/extensions/rpr-favorites/includes/favorites-list.php
  • 93× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/recipepress-reloaded/inc/frontend/widgets/class-recipe-nutritional-facts.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Recipepress\\Inc\\Common\\Abstracts\\Taxonomy' not found in wp-content/plugins/recipepress-reloaded/inc/admin/taxonomies/class-ingredient.php:17
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_setting() on null in wp-content/plugins/recipepress-reloaded/inc/extensions/rpr-social-media-sharing/includes/all-buttons.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Recipepress\\Inc\\Common\\Utilities\\Icons' not found in wp-content/plugins/recipepress-reloaded/inc/admin/settings/views/admin-display.php:27
    • > PHP Notice
      Undefined variable: recipe in wp-content/plugins/recipepress-reloaded/inc/frontend/templates/rpr_2column/recipe.php on line 21
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/recipepress-reloaded/inc/admin/metaboxes/views/rpr-nutrition-metabox.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Recipepress\\Inc\\Common\\Abstracts\\Taxonomy' not found in wp-content/plugins/recipepress-reloaded/inc/admin/taxonomies/class-custom-taxonomies.php:16
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/recipepress-reloaded/inc/frontend/templates/rpr_default/recipe.php on line 20
    • > PHP Fatal error
      Trait 'Recipepress\\Inc\\Common\\Traits\\Utilities' not found in wp-content/plugins/recipepress-reloaded/inc/admin/class-admin.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'Recipepress\\Inc\\Common\\Abstracts\\Metadata' not found in wp-content/plugins/recipepress-reloaded/inc/admin/metaboxes/class-source.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: cooking, baking, food blog, recipe, recipes...

recipepress-reloaded/recipe-press-reloaded.php 77% from 13 tests

"RecipePress Reloaded" version 2.12.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("recipepress-reloaded.php" instead of "recipe-press-reloaded.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 152 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "6.0.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected33,065 lines of code in 365 files:
LanguageFilesBlank linesComment linesLines of code
PHP1324,38610,69217,668
PO File42,0873,0255,195
CSS388641624,814
JavaScript365434222,880
SVG1522581311,149
JSON100838
HTML1110494
Markdown12027

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 153)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.34
▷ Minimum class complexity1.00
▷ Maximum class complexity289.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity153.00
Code structure
Namespaces23
Interfaces0
Traits3
Classes87
▷ Abstract classes910.34%
▷ Concrete classes7889.66%
▷ Final classes00.00%
Methods773
▷ Static methods293.75%
▷ Public methods65684.86%
▷ Protected methods526.73%
▷ Private methods658.41%
Functions47
▷ Named functions2655.32%
▷ Anonymous functions2144.68%
Constants34
▷ Global constants2367.65%
▷ Class constants1132.35%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/extensions/rpr-author-box/assets/images/icon.png0.37KB0.12KB▼ 67.02%
inc/frontend/assets/images/close.png0.27KB0.29KB0.00%
inc/frontend/assets/images/prev.png1.33KB1.59KB0.00%
inc/extensions/rpr-favorites/assets/images/icon.png0.37KB0.12KB▼ 67.02%
inc/admin/assets/images/minicolors.png67.02KB34.31KB▼ 48.80%