84% block-style-guides

Code Review | Block Style Guides

WordPress plugin Block Style Guides scored84%from 54 tests.

About plugin

  • Plugin page: block-style-guides
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 11, 2019
  • Latest release: Apr 28, 2019
  • Number of updates: 9
  • Update frequency: every 5.4 days
  • Top authors: RobertGillmer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,617 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Block Style Guides
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.34 ▲0.27
Dashboard /wp-admin3.32 ▲0.0247.37 ▼5.24
Posts /wp-admin/edit.php3.37 ▲0.0151.25 ▲0.77
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.28 ▼13.41
Media Library /wp-admin/upload.php3.24 ▲0.0141.19 ▲4.03
Block Style Guides for Gutenberg /wp-admin/tools.php?page=block-style-guides-for-gutenberg3.2134.35

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Block Style Guides
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.38 ▼0.172.35 ▲0.5446.04 ▲0.92
Dashboard /wp-admin2,196 ▲195.51 ▼0.1585.52 ▼18.2138.97 ▼4.11
Posts /wp-admin/edit.php2,104 ▲72.01 ▼0.0038.94 ▼1.2935.98 ▼1.49
Add New Post /wp-admin/post-new.php1,548 ▲1723.13 ▼0.12678.50 ▼27.4052.46 ▼8.17
Media Library /wp-admin/upload.php1,401 ▲14.18 ▼0.04109.15 ▼0.7747.86 ▲0.71
Block Style Guides for Gutenberg /wp-admin/tools.php?page=block-style-guides-for-gutenberg8431.7627.3031.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'BSG\\Base\\Abstract_Markup' not found in wp-content/plugins/block-style-guides/src/CoreWP/class-covers.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-style-guides/add-bsg-posts.php:146
    • > PHP Fatal error
      Uncaught Error: Class 'BSG\\Base\\Abstract_Markup' not found in wp-content/plugins/block-style-guides/src/CoreWP/class-images.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BSG\\Base\\Abstract_Markup' not found in wp-content/plugins/block-style-guides/src/CoreWP/class-other-layouts.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BSG\\Base\\Abstract_Markup' not found in wp-content/plugins/block-style-guides/src/CoreWP/class-standard-widgets.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/block-style-guides/admin-menu-functions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/block-style-guides/block-style-guides.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'BSG\\Base\\Abstract_Markup' not found in wp-content/plugins/block-style-guides/src/CoreWP/class-columns.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BSG\\Base\\Abstract_Markup' not found in wp-content/plugins/block-style-guides/src/CoreWP/class-quotes-pullquotes.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BSG\\Base\\Abstract_Markup' not found in wp-content/plugins/block-style-guides/src/CoBlocks/class-coblocks.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: blocks, gutenberg, block styling, gutenberg styling, gutenberg blocks

block-style-guides/block-style-guides.php 92% from 13 tests

This is the main PHP file of "Block Style Guides" version 1.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin2,212 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP215771052,033
JavaScript1225100
Markdown129079

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.40
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods1541.67%
▷ Protected methods2158.33%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin