10% recipe-manager

Code Review | Recipe Manager

WordPress plugin Recipe Manager scored 10% from 54 tests.

About plugin

  • Plugin page: recipe-manager
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9.4
  • WordPress version: 6.3.1
  • First release: Sep 6, 2016
  • Latest release: Feb 28, 2018
  • Number of updates: 14
  • Update frequency: every 39.4 days
  • Top authors: danieliser (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,766 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/recipe-manager/classes/Admin/Ingredients/Metaboxes.php+400
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Server metrics [RAM: ▲0.21MB] [CPU: ▲2.86ms] Passed 4 tests

This is a short check of server-side resources used by Recipe Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2151.07 ▲11.94
Dashboard /wp-admin3.56 ▲0.261,054.21 ▲1,007.59
Posts /wp-admin/edit.php3.61 ▲0.2551.28 ▲5.85
Add New Post /wp-admin/post-new.php6.08 ▲0.2088.65 ▼12.34
Media Library /wp-admin/upload.php3.40 ▲0.1738.29 ▲5.99
All Recipes /wp-admin/edit.php?post_type=recipe3.6348.17
Tools /wp-admin/edit.php?post_type=recipe&page=rcpm-tools3.81415.51
Add New /wp-admin/post-new.php?post_type=recipe3.6360.72
Course /wp-admin/edit-tags.php?taxonomy=recipe_course&post_type=recipe3.4141.84
Addons /wp-admin/edit.php?post_type=recipe&page=rcpm-addons3.3533.91
Add New /wp-admin/post-new.php?post_type=ingredient3.5453.36
Ingredients /wp-admin/edit.php?post_type=ingredient3.5753.72
Settings /wp-admin/edit.php?post_type=recipe&page=rcpm-settings3.3732.24

Server storage [IO: ▲0.65MB] [DB: ▲0.02MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 143 new files
Database: 1 new table, 12 new options
New tables
wp_rcpm_recipe_ingredients
New WordPress options
theysaidso_admin_options
rcpm_default_recipe_course_terms
can_compress_scripts
wp_rcpm_recipe_ingredients_db_version
widget_recent-comments
rcpm_settings
db_upgraded
widget_theysaidso_widget
rcpm_tracking_last_send
rcpm_sample_recipe_1
...

Browser metrics Passed 4 tests

Recipe Manager: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲23713.66 ▼0.725.57 ▲3.8142.52 ▼4.78
Dashboard /wp-admin2,287 ▲995.80 ▲0.9396.14 ▼7.1341.61 ▲1.94
Posts /wp-admin/edit.php2,169 ▲802.05 ▲0.0833.03 ▼2.7934.13 ▲1.29
Add New Post /wp-admin/post-new.php1,605 ▲9123.46 ▲5.90663.03 ▼41.2856.18 ▲1.98
Media Library /wp-admin/upload.php1,515 ▲1274.37 ▲0.1798.38 ▼11.6644.34 ▼1.21
All Recipes /wp-admin/edit.php?post_type=recipe1,8552.0433.6033.53
Tools /wp-admin/edit.php?post_type=recipe&page=rcpm-tools8522.1625.8326.72
Add New /wp-admin/post-new.php?post_type=recipe3,0938.01216.6481.70
Course /wp-admin/edit-tags.php?taxonomy=recipe_course&post_type=recipe1,7042.3126.7535.70
Addons /wp-admin/edit.php?post_type=recipe&page=rcpm-addons8462.0325.0025.43
Add New /wp-admin/post-new.php?post_type=ingredient2,6218.01181.6759.64
Ingredients /wp-admin/edit.php?post_type=ingredient3,3382.1536.6036.18
Settings /wp-admin/edit.php?post_type=recipe&page=rcpm-settings9282.3927.3526.58

Uninstaller [IO: ▲0.68MB] [DB: ▲0.02MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_rcpm_recipe_ingredients
  • Zombie WordPress options were found after uninstall: 12 options
    • wp_rcpm_recipe_ingredients_db_version
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • rcpm_sample_recipe_1
    • rcpm_default_recipe_course_terms
    • rcpm_settings
    • db_upgraded
    • theysaidso_admin_options
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=recipe&page=rcpm-tools
    • > Warning in wp-content/plugins/recipe-manager/includes/tool-functions.php+147
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/edit.php?post_type=recipe&page=rcpm-tools
    • > Deprecated in wp-content/plugins/recipe-manager/includes/libraries/browser.php+153
    Methods with the same name as their class will not be constructors in a future version of PHP; Browser has a deprecated constructor
    • > GET request to /wp-admin/edit.php?post_type=recipe&page=rcpm-addons
    • > Warning in wp-content/plugins/recipe-manager/includes/addon-functions.php+9
    file_get_contents(wp-content/plugins/recipe-manager/includes/addon-list.json): failed to open stream: No such file or directory

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/recipe-manager/templates/loop/loop-end.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rcpm_attr() in wp-content/plugins/recipe-manager/templates/loop/loop-start.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

recipe-manager/recipe-manager.php 92% from 13 tests

The entry point to "Recipe Manager" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Please improve your description making it at least 10 characters long (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected10,787 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
PHP822,1563,4296,709
Sass31211282,467
CSS1216056816
JavaScript1010128795

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.31
▷ Minimum class complexity1.00
▷ Maximum class complexity119.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes29
▷ Abstract classes00.00%
▷ Concrete classes29100.00%
▷ Final classes00.00%
Methods252
▷ Static methods8132.14%
▷ Public methods21484.92%
▷ Protected methods00.00%
▷ Private methods3815.08%
Functions137
▷ Named functions137100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin