84% tp-recipe

Code Review | TP Recipe

WordPress plugin TP Recipe scored84%from 54 tests.

About plugin

  • Plugin page: tp-recipe
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Mar 8, 2017
  • Latest release: Aug 15, 2022
  • Number of updates: 29
  • Update frequency: every 68.2 days
  • Top authors: themepalace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,785 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.94ms] Passed 4 tests

Server-side resources used by TP Recipe
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0751.10 ▲8.81
Dashboard /wp-admin3.37 ▲0.0644.12 ▼0.42
Posts /wp-admin/edit.php3.42 ▲0.0647.98 ▲2.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.24 ▼2.98
Media Library /wp-admin/upload.php3.29 ▲0.0638.21 ▲5.04
Add New /wp-admin/post-new.php?post_type=tp-recipe3.4450.20
All Ingredients /wp-admin/edit.php?post_type=tp-ingredient3.3338.43
All Recipes /wp-admin/edit.php?post_type=tp-recipe3.3332.92
Recipe Category /wp-admin/edit-tags.php?taxonomy=tp-recipe-category&post_type=tp-recipe3.2829.36
Add New /wp-admin/post-new.php?post_type=tp-ingredient3.3548.16

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for TP Recipe
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲12914.48 ▲0.172.28 ▲0.4550.96 ▲0.73
Dashboard /wp-admin2,267 ▲764.85 ▼1.05100.66 ▲0.1139.38 ▼8.11
Posts /wp-admin/edit.php2,147 ▲552.05 ▼0.0039.54 ▼0.0135.75 ▼0.49
Add New Post /wp-admin/post-new.php1,579 ▲5923.42 ▲0.39640.79 ▲34.1238.65 ▼18.27
Media Library /wp-admin/upload.php1,449 ▲644.17 ▼0.0298.84 ▲1.0743.67 ▲1.08
Add New /wp-admin/post-new.php?post_type=tp-recipe2,9678.23201.9397.02
All Ingredients /wp-admin/edit.php?post_type=tp-ingredient1,0992.0131.9328.89
All Recipes /wp-admin/edit.php?post_type=tp-recipe1,1671.9731.5230.09
Recipe Category /wp-admin/edit-tags.php?taxonomy=tp-recipe-category&post_type=tp-recipe1,3232.1428.0526.58
Add New /wp-admin/post-new.php?post_type=tp-ingredient1,6663.6666.8130.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-recipe/tp-recipe/include/tp-functions.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tp-recipe/tp-recipe/templates/tp-single-recipe.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-recipe/tp-recipe/templates/template-part/tp-content-single.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-recipe/templates/template-part/tp-content-single.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp-recipe/include/tp-functions.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tp-recipe/templates/tp-single-recipe.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tp-recipe/tp-recipe/templates/tp-archive-recipe.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tp-recipe/templates/tp-archive-recipe.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: ingredient quantity, ingredients, restaurant, recipe

tp-recipe/tp-recipe.php Passed 13 tests

"TP Recipe" version 1.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
139 characters long description:
This Plugin provides you an Food Item Recipe and it's ingredients forms to uplift your Restaurant Website with your prominent item recipes.

Code Analysis Passed 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
There were no executable files found in this plugin2,551 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript7120171,215
PHP10157199687
CSS42759649

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity35.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes220.00%
Methods36
▷ Static methods25.56%
▷ Public methods3494.44%
▷ Protected methods00.00%
▷ Private methods25.56%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/css/chosen-sprite.png0.53KB0.88KB0.00%
tp-recipe/assets/css/chosen-sprite@2x.png0.72KB0.83KB0.00%
tp-recipe/assets/css/chosen-sprite.png0.53KB0.88KB0.00%