83% nblocks

Code Review | nBlocks - Responsive Gutenberg News Blocks

WordPress plugin nBlocks - Responsive Gutenberg News Blocks scored 83% from 54 tests.

About plugin

  • Plugin page: nblocks
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.1
  • WordPress version: 6.3.1
  • First release: May 11, 2023
  • Latest release: May 20, 2023
  • Number of updates: 14
  • Update frequency: every 0.7 days
  • Top authors: officialprocoders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 115 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by nBlocks - Responsive Gutenberg News Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.99 ▲0.57
Dashboard /wp-admin3.32 ▲0.0151.25 ▼2.32
Posts /wp-admin/edit.php3.37 ▲0.0156.69 ▲1.73
Add New Post /wp-admin/post-new.php5.90 ▲0.02101.30 ▲2.03
Media Library /wp-admin/upload.php3.24 ▲0.0146.83 ▲7.88

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for nBlocks - Responsive Gutenberg News Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲1413.20 ▼1.321.77 ▲0.1142.67 ▲0.01
Dashboard /wp-admin2,206 ▼34.86 ▼1.01110.57 ▲4.3039.41 ▼3.47
Posts /wp-admin/edit.php2,089 ▲32.01 ▲0.0240.52 ▲4.8935.47 ▲0.74
Add New Post /wp-admin/post-new.php1,644 ▲13021.00 ▲3.34794.07 ▲151.9758.41 ▲6.75
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.00103.25 ▼0.7743.72 ▲1.66

Uninstaller [IO: ✅] [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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-featured-big-multiloop.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-center-image.php:40
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-center-image.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-3col-noimage.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-5col-masonry.php:40
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-3col-masonry.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-tiny-block-one.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-featured-big.php:40
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-tiny-block-one.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/nblocks/blocks/post-filter/templates/nblock-featured-big-multiloop.php:41

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

nblocks/n-blocks.php 77% from 13 tests

The principal PHP file in "nBlocks - Responsive Gutenberg News Blocks" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nblocks.php" instead of "n-blocks.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 233 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin20,506 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JSON30018,268
JavaScript523731,110
PHP1319271,027
Sass25070
Markdown113029
CSS2002

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
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
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
blocks/post-filter/img/lmsp.png3.50KB1.59KB▼ 54.63%
blocks/post-filter/img/smpsc.png3.44KB1.67KB▼ 51.52%
blocks/post-filter/img/lf.png2.62KB1.19KB▼ 54.42%
blocks/post-filter/img/md3c.png3.29KB1.42KB▼ 56.82%
blocks/post-filter/img/md4c.png3.32KB1.40KB▼ 57.78%