84% wpdevhub-recipes

Code Review | WPDevHub Recipe Catalog

WordPress plugin WPDevHub Recipe Catalog scored84%from 54 tests.

About plugin

  • Plugin page: wpdevhub-recipes
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Mar 27, 2020
  • Latest release: Mar 27, 2020
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: benhallbenhall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /353 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.08ms] Passed 4 tests

A check of server-side resources used by WPDevHub Recipe Catalog
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.85 ▼4.78
Dashboard /wp-admin3.47 ▲0.1250.50 ▼11.68
Posts /wp-admin/edit.php3.52 ▲0.1651.30 ▲0.89
Add New Post /wp-admin/post-new.php6.01 ▲0.1293.77 ▼8.76
Media Library /wp-admin/upload.php3.33 ▲0.1039.46 ▲1.28
Settings /wp-admin/edit.php?post_type=wpdevhub_drc_recipe&page=wpdevhub-drc-settings3.3438.81
Categories /wp-admin/edit-tags.php?taxonomy=wpdevhub_drc_recipe_category&post_type=wpdevhub_drc_recipe3.4837.95
All Recipes /wp-admin/edit.php?post_type=wpdevhub_drc_recipe3.4438.87
Add New /wp-admin/post-new.php?post_type=wpdevhub_drc_recipe3.5657.70
Tags /wp-admin/edit-tags.php?taxonomy=wpdevhub_drc_recipe_tag&post_type=wpdevhub_drc_recipe3.3237.04

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 65 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
wpdevhub-drc-db-version

Browser metrics Passed 4 tests

A check of browser resources used by WPDevHub Recipe Catalog
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲17513.53 ▼1.027.99 ▲5.6945.07 ▼0.79
Dashboard /wp-admin2,241 ▲705.66 ▲0.0295.26 ▲4.6142.51 ▼0.30
Posts /wp-admin/edit.php2,149 ▲492.03 ▼0.0137.09 ▼6.0231.12 ▼7.19
Add New Post /wp-admin/post-new.php1,564 ▲3621.95 ▼1.19663.14 ▼27.3354.21 ▲4.33
Media Library /wp-admin/upload.php1,449 ▲494.15 ▼0.0599.42 ▼2.2342.19 ▼3.71
Settings /wp-admin/edit.php?post_type=wpdevhub_drc_recipe&page=wpdevhub-drc-settings1,0041.6925.0035.45
Categories /wp-admin/edit-tags.php?taxonomy=wpdevhub_drc_recipe_category&post_type=wpdevhub_drc_recipe1,3232.1730.5931.58
All Recipes /wp-admin/edit.php?post_type=wpdevhub_drc_recipe1,1581.9933.0032.93
Add New /wp-admin/post-new.php?post_type=wpdevhub_drc_recipe2,9048.09177.9074.90
Tags /wp-admin/edit-tags.php?taxonomy=wpdevhub_drc_recipe_tag&post_type=wpdevhub_drc_recipe1,2922.1726.7228.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • wpdevhub-drc-db-version
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPDEVHUB_DRC_StandardCustomPostType' not found in wp-content/plugins/wpdevhub-recipes/classes/class.WPDEVHUB_DRC_Recipes_Recipe.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPDEVHUB_DRC_StandardMetaBox' not found in wp-content/plugins/wpdevhub-recipes/classes/core/class.WPDEVHUB_DRC_StandardMetaBoxAndDbObject.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPDEVHUB_DRC_StandardMetaBox' not found in wp-content/plugins/wpdevhub-recipes/classes/class.WPDEVHUB_DRC_Recipes_InstructionMetaBox.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPDEVHUB_DRC_StandardMetaBox' not found in wp-content/plugins/wpdevhub-recipes/classes/class.WPDEVHUB_DRC_Recipes_MediaMetaBox.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPDEVHUB_DRC_StandardMetaBox' not found in wp-content/plugins/wpdevhub-recipes/classes/class.WPDEVHUB_DRC_Recipes_ExtraInfoMetaBox.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wpdevhub-recipes/classes/class.WPDEVHUB_DRC_Recipes_CardLinkWidget.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WPDEVHUB_DRC_StandardMetaBox' not found in wp-content/plugins/wpdevhub-recipes/classes/class.WPDEVHUB_DRC_Recipes_RecipeShortCodeMetaBox.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPDEVHUB_DRC_Utilities' not found in wp-content/plugins/wpdevhub-recipes/pages/inc.settings-base.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpdevhub_drc_add_define() in wp-content/plugins/wpdevhub-recipes/inc/inc.ver.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WPDEVHUB_DRC_StandardMain' not found in wp-content/plugins/wpdevhub-recipes/classes/class.WPDEVHUB_DRC_Recipes_Main.php:9

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6 in wpdevhub-recipes/assets to your readme.txt
The official readme.txt might help

wpdevhub-recipes/index.php 92% from 13 tests

The main PHP file in "WPDevHub Recipe Catalog" ver. 2.7 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpdevhub-recipes.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin6,426 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,2571,5934,947
CSS210730843
JavaScript3127118636

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity27.96
▷ Minimum class complexity1.00
▷ Maximum class complexity240.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes00.00%
▷ Concrete classes26100.00%
▷ Final classes00.00%
Methods330
▷ Static methods28486.06%
▷ Public methods330100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants176
▷ Global constants42.27%
▷ Class constants17297.73%
▷ Public constants172100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
24 PNG files occupy 0.17MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo_300.png14.72KB4.28KB▼ 70.95%
images/page_add.png1.33KB1.31KB▼ 1.32%
images/document_layout.png0.91KB1.00KB0.00%
images/group.png2.04KB1.52KB▼ 25.61%
images/facebook-icon32.png2.15KB1.75KB▼ 18.51%