84% dr-widgets-blocks

Code Review | Delicious Recipes Widgets and Blocks

WordPress plugin Delicious Recipes Widgets and Blocks scored 84% from 54 tests.

About plugin

  • Plugin page: dr-widgets-blocks
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Jul 20, 2022
  • Latest release: May 31, 2023
  • Number of updates: 20
  • Update frequency: every 15.8 days
  • Top authors: wpdelicious (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 972 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.17ms] Passed 4 tests

A check of server-side resources used by Delicious Recipes Widgets and Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.53 ▼2.90
Dashboard /wp-admin3.32 ▲0.0248.05 ▼1.61
Posts /wp-admin/edit.php3.38 ▲0.0242.92 ▼5.97
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.74 ▼6.19
Media Library /wp-admin/upload.php3.25 ▲0.0237.77 ▲3.70

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 99 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Delicious Recipes Widgets and Blocks: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.27 ▼1.111.90 ▼0.0439.76 ▼3.13
Dashboard /wp-admin2,222 ▲345.84 ▲0.9596.42 ▼23.0140.07 ▼9.67
Posts /wp-admin/edit.php2,107 ▲182.02 ▼0.1634.05 ▼2.2534.06 ▲0.26
Add New Post /wp-admin/post-new.php1,548 ▲3423.33 ▲5.75656.58 ▼36.6348.55 ▼4.95
Media Library /wp-admin/upload.php1,410 ▲254.23 ▼0.0498.70 ▼1.6542.71 ▼3.77

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

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
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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DR_Widgets_Blocks\\add_action() in wp-content/plugins/dr-widgets-blocks/src/classes/class-fonts-manager.php:704

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 97% 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:
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

dr-widgets-blocks/dr-widgets-blocks.php Passed 13 tests

The principal PHP file in "Delicious Recipes Widgets and Blocks" v. 1.0.3 is loaded by WordPress automatically on each request
127 characters long description:
With Delicious Recipes Widgets and Blocks, anyone can create beautiful and interactive recipe blogs with a quick drag-and-drop.

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
Good job! No executable or dangerous file extensions detected52,844 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
JSON60034,793
JavaScript91,67524511,012
PHP517551,3216,964
CSS1241357
SVG10018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity25.11
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity56.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes15.26%
Methods148
▷ Static methods2617.57%
▷ Public methods11678.38%
▷ Protected methods96.08%
▷ Private methods2315.54%
Functions26
▷ Named functions1661.54%
▷ Anonymous functions1038.46%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin