89% cooking-recipe-block

Code Review | Receipe block

WordPress plugin Receipe block scored89%from 54 tests.

About plugin

  • Plugin page: cooking-recipe-block
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8.0
  • WordPress version: 6.3.1
  • First release: Jan 22, 2022
  • Latest release: Jan 22, 2022
  • Number of updates: 3
  • Update frequency: every 33.0 days
  • Top authors: rajanpanchal2028 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /529 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.43ms] Passed 4 tests

Analyzing server-side resources used by Receipe block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.53 ▼11.40
Dashboard /wp-admin3.32 ▼0.0350.81 ▼12.96
Posts /wp-admin/edit.php3.37 ▲0.0148.71 ▲0.14
Add New Post /wp-admin/post-new.php5.85 ▼0.0487.80 ▲1.05
Media Library /wp-admin/upload.php3.24 ▲0.0138.41 ▼1.50

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Receipe block: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲17413.81 ▼0.5610.12 ▲8.0644.16 ▼0.14
Dashboard /wp-admin2,201 ▲215.59 ▼0.0181.32 ▼12.0542.10 ▲1.71
Posts /wp-admin/edit.php2,109 ▲91.99 ▼0.0237.68 ▲0.7035.38 ▲1.06
Add New Post /wp-admin/post-new.php6,371 ▲4,84528.07 ▲5.03886.57 ▲241.7262.30 ▲1.55
Media Library /wp-admin/upload.php1,406 ▲34.21 ▲0.0395.48 ▼5.2744.50 ▲0.02

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (`/assets/Screenshot-1.png`) image required
The official readme.txt might help

cooking-recipe-block/recepe-gutenberg-block.php 92% from 13 tests

The principal PHP file in "Receipe block" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("cooking-recipe-block.php" instead of "recepe-gutenberg-block.php")

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
Good job! No executable or dangerous file extensions detected17,243 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JSON20016,391
JavaScript69513525
PHP23420219
CSS6218107
Markdown1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants0
▷ Global constants00.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.10MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot-1.png106.59KB26.20KB▼ 75.42%