84% block-patterns-for-food-bloggers

Code Review | Block Patterns for Food Bloggers

WordPress plugin Block Patterns for Food Bloggers scored84%from 54 tests.

About plugin

  • Plugin page: block-patterns-fo...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.3
  • WordPress version: 6.3.1
  • First release: Jun 1, 2022
  • Latest release: Aug 9, 2023
  • Number of updates: 8
  • Update frequency: every 54.3 days
  • Top authors: WPZOOM (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /3,650 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.82ms] Passed 4 tests

Analyzing server-side resources used by Block Patterns for Food Bloggers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1434.62 ▼2.98
Dashboard /wp-admin3.44 ▲0.0944.73 ▼12.29
Posts /wp-admin/edit.php3.49 ▲0.1347.59 ▼0.20
Add New Post /wp-admin/post-new.php6.02 ▲0.1490.17 ▼3.79
Media Library /wp-admin/upload.php3.36 ▲0.1336.20 ▲4.33

Server storage [IO: ▲1.91MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 77 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Block Patterns for Food Bloggers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲13713.61 ▼1.065.61 ▲3.9740.64 ▼2.49
Dashboard /wp-admin2,206 ▲185.91 ▲0.99107.96 ▼1.9039.72 ▼0.47
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0939.64 ▲1.0835.87 ▲1.80
Add New Post /wp-admin/post-new.php1,526 ▲1224.04 ▲6.55671.83 ▲32.0462.65 ▲9.29
Media Library /wp-admin/upload.php1,385 ▼34.18 ▼0.0295.40 ▼0.5641.60 ▼2.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 32× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/search2.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/loop4.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/newsletter3.php:5
    • > PHP Warning
      Use of undefined constant WPZOOM_FB_PATTERNS_URL - assumed 'WPZOOM_FB_PATTERNS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/hero.php on line 2
    • > PHP Warning
      Use of undefined constant WPZOOM_FB_PATTERNS_URL - assumed 'WPZOOM_FB_PATTERNS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/instagram.php on line 2
    • > PHP Warning
      Use of undefined constant WPZOOM_FB_PATTERNS_URL - assumed 'WPZOOM_FB_PATTERNS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/newsletter.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/hero3.php:5
    • > PHP Warning
      Use of undefined constant WPZOOM_FB_PATTERNS_URL - assumed 'WPZOOM_FB_PATTERNS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/newsletter3.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/loop3.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/block-patterns-for-food-bloggers/patterns/free/featured/loop2.php:7

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Patterns Library) image required
You can look at the official readme.txt

block-patterns-for-food-bloggers/block-patterns-for-food-bloggers.php 92% from 13 tests

"Block Patterns for Food Bloggers" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.4" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,629 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP23209122956
JavaScript16121223903
Sass21736530
CSS2261238
Markdown1002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
17 PNG files occupy 0.45MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
patterns/images/vegetables.png1.96KB1.29KB▼ 34.10%
patterns/images/chicken.png1.87KB1.28KB▼ 31.70%
patterns/images/RECIPE-101.png2.29KB1.08KB▼ 52.63%
screenshot-1.png105.21KB109.94KB0.00%
patterns/images/pasta.png2.69KB1.71KB▼ 36.48%