84% wp-recipe-manager

Code Review | WP Recipe Manager

WordPress plugin WP Recipe Manager scored84%from 54 tests.

About plugin

  • Plugin page: wp-recipe-manager
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2017
  • Latest release: May 18, 2019
  • Number of updates: 6
  • Update frequency: every 87.0 days
  • Top authors: tomiup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /976 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.23MB] [CPU: ▲0.29ms] Passed 4 tests

Analyzing server-side resources used by WP Recipe Manager
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2243.94 ▲3.49
Dashboard /wp-admin3.67 ▲0.36486.03 ▲434.99
Posts /wp-admin/edit.php3.62 ▲0.2647.56 ▲3.15
Add New Post /wp-admin/post-new.php6.11 ▲0.2284.53 ▼5.32
Media Library /wp-admin/upload.php3.43 ▲0.2037.72 ▼0.16
Add New /wp-admin/post-new.php?post_type=recipe3.6454.85
Tags /wp-admin/edit-tags.php?taxonomy=recipe_tag&post_type=recipe3.4235.53
Categories /wp-admin/edit-tags.php?taxonomy=recipe_category&post_type=recipe3.4335.94
All Recipes /wp-admin/edit.php?post_type=recipe3.4736.16
Cuisines /wp-admin/edit-tags.php?taxonomy=recipe_cuisine&post_type=recipe3.4235.59

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Recipe Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲18013.30 ▼0.912.05 ▼0.0942.96 ▼6.31
Dashboard /wp-admin2,281 ▲905.91 ▲0.99101.53 ▼4.1882.27 ▲39.27
Posts /wp-admin/edit.php2,140 ▲512.25 ▲0.2638.63 ▼0.1133.68 ▼0.78
Add New Post /wp-admin/post-new.php6,414 ▲4,90028.44 ▲10.931,009.53 ▲331.4739.20 ▼21.81
Media Library /wp-admin/upload.php1,428 ▲404.31 ▲0.12102.07 ▼8.8047.24 ▼2.91
Add New /wp-admin/post-new.php?post_type=recipe2,9288.15202.35116.12
Tags /wp-admin/edit-tags.php?taxonomy=recipe_tag&post_type=recipe1,2841.9128.2729.82
Categories /wp-admin/edit-tags.php?taxonomy=recipe_category&post_type=recipe1,3091.9125.6829.28
All Recipes /wp-admin/edit.php?post_type=recipe1,1642.1832.9132.35
Cuisines /wp-admin/edit-tags.php?taxonomy=recipe_cuisine&post_type=recipe1,3121.9033.1130.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_ID() in wp-content/plugins/wp-recipe-manager/templates/content-single.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-recipe-manager/inc/plugin-core.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-recipe-manager/inc/post-type.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-recipe-manager/inc/libs/class.metaboxes.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-recipe-manager/inc/template-loader.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-recipe-manager/inc/metaboxes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-recipe-manager/templates/single.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: recipes, recipe, cook, recipe manager

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

The entry point to "WP Recipe Manager" version 1.0.0 is a PHP file that has certain tags in its header comment area
137 characters long description:
WP Recipe Manager plugin supports fully features for a cooking recipe with recipe general information, ingredients/ instruction creation.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected4,049 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
SVG1032,227
PHP9148140819
Sass39257619
CSS44922283
JavaScript33725101

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.75
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu_icon.png15.96KB0.79KB▼ 95.03%