77% the-plus-addons-for-block-editor

Code Review | The Plus Blocks for Block Editor | Gutenberg

WordPress plugin The Plus Blocks for Block Editor | Gutenberg scored77%from 54 tests.

About plugin

  • Plugin page: the-plus-addons-f...
  • Plugin version: 3.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 9, 2020
  • Latest release: Nov 27, 2023
  • Number of updates: 68
  • Update frequency: every 16.2 days
  • Top authors: posimyththemes (100%)

Code review

54 tests

User reviews

46 reviews

Install metrics

5,000+ active /90,093 total downloads

Benchmarks

Plugin footprint 81% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲8.77MB] [CPU: ▲35.29ms] 25% from 4 tests

This is a short check of server-side resources used by The Plus Blocks for Block Editor | Gutenberg
It is recommended to improve the following
  • RAM: Total memory usage must be kept under 10MB (currently 12.59MB on /wp-admin/admin.php?page=tpgb_normal_blocks_opts)
  • CPU: Try to keep total CPU usage under 500.00ms (currently 685.04ms on /wp-admin/admin.php?page=tpgb_connection_data)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 8.77MB on /wp-admin/admin.php?page=tpgb_normal_blocks_opts)
PageMemory (MB)CPU Time (ms)
Home /12.58 ▲9.1281.36 ▲40.92
Dashboard /wp-admin11.99 ▲8.6586.73 ▲23.06
Posts /wp-admin/edit.php12.05 ▲8.6991.01 ▲41.62
Add New Post /wp-admin/post-new.php17.43 ▲11.54148.07 ▲62.33
Media Library /wp-admin/upload.php11.84 ▲8.6172.20 ▲35.56
Welcome /wp-admin/admin.php?page=tpgb_welcome_page12.0272.87
Patterns /wp-admin/edit.php?post_type=wp_block11.9971.19
Activate /wp-admin/admin.php?page=tpgb_activate11.8571.92
Performance /wp-admin/admin.php?page=tpgb_performance11.8571.09
Custom /wp-admin/admin.php?page=tpgb_custom_css_js11.8567.09
White Label /wp-admin/admin.php?page=tpgb_white_label11.8568.05
Extra Options /wp-admin/admin.php?page=tpgb_connection_data12.27685.04
Plus Blocks /wp-admin/admin.php?page=tpgb_normal_blocks_opts12.5972.94

Server storage [IO: ▲13.03MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 968 new files
Database: no new tables, 11 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
tpgb_version_dynamic_cache
widget_theysaidso_widget
db_upgraded
widget_recent-comments
tpgb-load-templates-list
tpgb_global_options
tpgb_defer_css_js
tpgb_delay_css_js
...

Browser metrics Passed 4 tests

An overview of browser requirements for The Plus Blocks for Block Editor | Gutenberg
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,100 ▲34214.84 ▲0.658.82 ▲7.0137.87 ▼4.50
Dashboard /wp-admin2,407 ▲2296.18 ▲0.44118.00 ▲2.9742.98 ▲4.20
Posts /wp-admin/edit.php2,336 ▲2363.31 ▲1.3753.59 ▲16.5633.02 ▲1.83
Add New Post /wp-admin/post-new.php1,658 ▲13226.51 ▲3.44763.33 ▲134.2185.30 ▲33.25
Media Library /wp-admin/upload.php1,475 ▲754.05 ▼0.0881.26 ▼14.1941.26 ▼4.04
Welcome /wp-admin/admin.php?page=tpgb_welcome_page1,9642.9550.51138.18
Patterns /wp-admin/edit.php?post_type=wp_block1,3768.10180.9229.86
Activate /wp-admin/admin.php?page=tpgb_activate1,2303.0141.2894.70
Performance /wp-admin/admin.php?page=tpgb_performance1,2523.1140.8245.48
Custom /wp-admin/admin.php?page=tpgb_custom_css_js1,2082.9645.3636.58
White Label /wp-admin/admin.php?page=tpgb_white_label1,1762.9742.9982.00
Extra Options /wp-admin/admin.php?page=tpgb_connection_data1,4883.1143.9541.52
Plus Blocks /wp-admin/admin.php?page=tpgb_normal_blocks_opts4,27012.13145.3069.73

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 11 options in the database
    • can_compress_scripts
    • tpgb_global_options
    • tpgb_defer_css_js
    • tpgb-load-templates-list
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • tpgb_version_dynamic_cache
    • tpgb_delay_css_js
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/the-plus-addons-for-block-editor/includes/social-feed/fancybox-header.php
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: FancyStyle in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-feed/fancybox-feed.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-reviews/social-review-style-1.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-reviews/social-review-ob-style.php:20
    • > PHP Notice
      Undefined variable: Type in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-feed/fancybox-feed.php on line 39
    • > PHP Notice
      Undefined variable: PopupOption in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-feed/fancybox-feed.php on line 9
    • > PHP Notice
      Undefined variable: Type in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-feed/fancybox-feed.php on line 39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-feed/social-feed-style-3.php:8
    • > PHP Warning
      include(TPGB_INCLUDES_URLsocial-reviews/social-review-showmore.php): failed to open stream: No such file or directory in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-reviews/social-review-ob-style.php on line 5
    • > PHP Notice
      Undefined variable: PopupOption in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-feed/fancybox-feed.php on line 14
    • > PHP Warning
      Use of undefined constant TPGB_INCLUDES_URL - assumed 'TPGB_INCLUDES_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/the-plus-addons-for-block-editor/includes/social-reviews/social-review-ob-style.php on line 5

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 issues were found

Optimizations

Plugin configuration 96% from 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
6 plugin tags: gutenberg addons, wordpress blocks, gutenberg blocks, block editor, blocks...

the-plus-addons-for-block-editor/the-plus-addons-for-block-editor.php 92% from 13 tests

"The Plus Blocks for Block Editor | Gutenberg" version 3.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin94,043 lines of code in 873 files:
LanguageFilesBlank linesComment linesLines of code
PHP1023,1082,91658,512
SVG4852089116,605
CSS18281540215,356
JavaScript1043611073,570

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 183)
Cyclomatic complexity
Average complexity per logical line of code0.68
Average class complexity226.33
▷ Minimum class complexity8.00
▷ Maximum class complexity668.00
Average method complexity10.76
▷ Minimum method complexity1.00
▷ Maximum method complexity183.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes16.67%
Methods326
▷ Static methods6319.33%
▷ Public methods31596.63%
▷ Protected methods10.31%
▷ Private methods103.07%
Functions164
▷ Named functions14789.63%
▷ Anonymous functions1710.37%
Constants21
▷ Global constants2095.24%
▷ Class constants14.76%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
53 PNG files occupy 1.03MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/overlays/style-6.png0.21KB0.10KB▼ 52.61%
assets/images/dynamic-devices/iphone-white-flat.png4.13KB2.42KB▼ 41.41%
assets/images/on-boarding/page1.png23.69KB23.68KB0.04%
assets/images/theplus-logo.png5.93KB3.52KB▼ 40.63%
assets/images/activate.png12.10KB6.03KB▼ 50.18%