78% best-wp-blocks

Code Review | WOW Best WP Blocks

WordPress plugin WOW Best WP Blocks scored78%from 54 tests.

About plugin

  • Plugin page: best-wp-blocks
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2021
  • Latest release: Oct 30, 2022
  • Number of updates: 6
  • Update frequency: every 71.3 days
  • Top authors: baonguyenyam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /446 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.33ms] Passed 4 tests

An overview of server-side resources used by WOW Best WP Blocks
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.05 ▼7.75
Dashboard /wp-admin3.38 ▲0.0349.02 ▼15.85
Posts /wp-admin/edit.php3.49 ▲0.1348.11 ▼0.64
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.15 ▼0.44
Media Library /wp-admin/upload.php3.30 ▲0.0737.80 ▼1.09
Add Block /wp-admin/post-new.php?post_type=wow_blocks3.4349.02
Best WP Blocks /wp-admin/edit.php?post_type=wow_blocks3.3440.26

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 580 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

WOW Best WP Blocks: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.57 ▼0.831.61 ▼0.1037.09 ▼7.71
Dashboard /wp-admin2,236 ▲484.87 ▼0.06103.76 ▼0.7439.68 ▼3.97
Posts /wp-admin/edit.php2,113 ▲242.00 ▲0.0136.49 ▼2.4633.25 ▲1.78
Add New Post /wp-admin/post-new.php1,565 ▲3718.38 ▲0.07595.71 ▼20.3860.10 ▲0.75
Media Library /wp-admin/upload.php1,418 ▲364.14 ▼0.0999.98 ▼5.0343.32 ▼0.95
Add Block /wp-admin/post-new.php?post_type=wow_blocks2,3407.89172.2566.70
Best WP Blocks /wp-admin/edit.php?post_type=wow_blocks1,1142.0230.3231.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/best-wp-blocks/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
  • 214× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Theme_Options_Container' not found in wp-content/plugins/best-wp-blocks/vendor/htmlburger/carbon-fields/core/Container/Network_Container.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Meta_Datastore' not found in wp-content/plugins/best-wp-blocks/vendor/htmlburger/carbon-fields/core/Datastore/Network_Datastore.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/best-wp-blocks/vendor/htmlburger/carbon-fields/core/Container/Broken_Container.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/best-wp-blocks/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/best-wp-blocks/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/best-wp-blocks/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/best-wp-blocks/vendor/composer/installers/src/Composer/Installers/Plugin.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Service\\Service' not found in wp-content/plugins/best-wp-blocks/vendor/htmlburger/carbon-fields/core/Service/Legacy_Storage_Service_v_1_5.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/best-wp-blocks/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/best-wp-blocks/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === best-wp-blocks === )
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in best-wp-blocks/assets to your readme.txt
You can take inspiration from this readme.txt

best-wp-blocks/nguyen-app.php 92% from 13 tests

Analyzing the main PHP file in "WOW Best WP Blocks" version 1.2.0
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("best-wp-blocks.php" instead of "nguyen-app.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin30,554 lines of code in 522 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1715,1888,45912,933
PHP2562,9307,42910,900
PO File268191,0202,202
Sass4934211,896
CSS93291,1391,779
JSON500658
YAML3303118
Markdown324068

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.38
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces23
Interfaces5
Traits0
Classes229
▷ Abstract classes125.24%
▷ Concrete classes21794.76%
▷ Final classes10.46%
Methods1,016
▷ Static methods929.06%
▷ Public methods80278.94%
▷ Protected methods19919.59%
▷ Private methods151.48%
Functions113
▷ Named functions2723.89%
▷ Anonymous functions8676.11%
Constants35
▷ Global constants822.86%
▷ Class constants2777.14%
▷ Public constants27100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/logo.png14.66KB7.71KB▼ 47.40%
admin/assets/img/icon.png10.50KB5.29KB▼ 49.68%