84% dispensary-blocks

Code Review | Dispensary Blocks

WordPress plugin Dispensary Blocks scored84%from 54 tests.

About plugin

  • Plugin page: dispensary-blocks
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2019
  • Latest release: Aug 14, 2019
  • Number of updates: 12
  • Update frequency: every 20.5 days
  • Top authors: deviodigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,864 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.29MB] [CPU: ▼13.09ms] Passed 4 tests

Analyzing server-side resources used by Dispensary Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0537.79 ▼1.11
Dashboard /wp-admin3.33 ▲0.0345.15 ▼3.89
Posts /wp-admin/edit.php3.38 ▲0.0350.78 ▲3.69
Add New Post /wp-admin/post-new.php4.62 ▼1.2643.19 ▼47.70
Media Library /wp-admin/upload.php3.25 ▲0.0333.21 ▲0.35
Product Blocks /wp-admin/admin.php?page=dispensary-blocks3.2231.34

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 122 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Dispensary Blocks
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲15613.92 ▼0.468.39 ▲6.7337.65 ▼3.84
Dashboard /wp-admin2,219 ▲284.84 ▼1.06106.93 ▼37.4642.48 ▼1.75
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0241.22 ▲2.9635.27 ▲4.14
Add New Post /wp-admin/post-new.php6,424 ▲4,88220.90 ▲2.48894.33 ▲294.6175.89 ▲15.29
Media Library /wp-admin/upload.php1,392 ▲44.33 ▲0.1095.95 ▼11.8741.49 ▼1.48
Product Blocks /wp-admin/admin.php?page=dispensary-blocks9292.0126.2623.29

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 9× 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/dispensary-blocks/src/blocks/block-gear-grid/index.php:310
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-blocks/src/blocks/block-growers-grid/index.php:311
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-blocks/src/blocks/block-tinctures-grid/index.php:310
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-blocks/src/blocks/block-topicals-grid/index.php:311
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-blocks/dist/getting-started/getting-started.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-blocks/src/blocks/block-concentrates-grid/index.php:311
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-blocks/src/blocks/block-flowers-grid/index.php:311
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-blocks/src/blocks/block-edibles-grid/index.php:311
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-blocks/src/blocks/block-prerolls-grid/index.php:311

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
5 plugin tags: cannabis, gutenberg, blocks, editor, dispensary

dispensary-blocks/dispensary-blocks.php Passed 13 tests

Analyzing the main PHP file in "Dispensary Blocks" version 1.3
88 characters long description:
Display your WP Dispensary products in style with the new Gutenberg editor for WordPress

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 detected25,745 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
JSON30010,963
CSS152,024505,211
SVG15003,939
JavaScript294594502,941
PHP114695862,267
Sass3721369
XML113546
Bourne Shell1105
Markdown1304

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
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%
Functions52
▷ Named functions5198.08%
▷ Anonymous functions11.92%
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
4 PNG files occupy 0.35MB with 0.20MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png225.13KB89.07KB▼ 60.44%
dist/getting-started/logo.png28.80KB14.31KB▼ 50.32%
dist/getting-started/images/wpd-icon.png8.26KB3.83KB▼ 53.61%
assets/screenshot-2.png94.65KB36.48KB▼ 61.46%