83% ninja-gutenberg-blocks-gutenberg-blocks-collection

Code Review | Ninja Gutenberg Blocks - Gutenberg Blocks Collection

WordPress plugin Ninja Gutenberg Blocks - Gutenberg Blocks Collection scored83%from 54 tests.

About plugin

  • Plugin page: ninja-gutenberg-b...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.0
  • WordPress version: 6.3.1
  • First release: Nov 27, 2018
  • Latest release: Dec 11, 2018
  • Number of updates: 7
  • Update frequency: every 3.0 days
  • Top authors: adreastrian (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,256 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.19MB] [CPU: ▼16.41ms] Passed 4 tests

Server-side resources used by Ninja Gutenberg Blocks - Gutenberg Blocks Collection
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1141.26 ▼2.86
Dashboard /wp-admin3.39 ▲0.0449.25 ▼16.84
Posts /wp-admin/edit.php3.44 ▲0.0846.78 ▼1.79
Add New Post /wp-admin/post-new.php4.90 ▼0.9854.06 ▼44.15
Media Library /wp-admin/upload.php3.31 ▲0.0838.52 ▲2.99

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 126 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Ninja Gutenberg Blocks - Gutenberg Blocks Collection
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18713.72 ▼0.6010.32 ▲8.5438.51 ▼4.51
Dashboard /wp-admin2,206 ▲184.84 ▼0.0399.59 ▼16.6041.35 ▼0.83
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0836.55 ▼1.7332.95 ▼1.89
Add New Post /wp-admin/post-new.php6,188 ▲4,67419.77 ▲2.14962.29 ▲274.5968.66 ▲8.02
Media Library /wp-admin/upload.php1,391 ▼04.13 ▼0.05103.65 ▼3.0042.41 ▼3.83

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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 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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ninja-gutenberg-blocks-gutenberg-blocks-collection/src/blocks/social-share/index.php:62
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ninja-gutenberg-blocks-gutenberg-blocks-collection/src/blocks/post-grid/index.php:158

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Version not formatted correctly
The official readme.txt is a good inspiration

ninja-gutenberg-blocks-gutenberg-blocks-collection/plugin.php 85% from 13 tests

The main PHP file in "Ninja Gutenberg Blocks - Gutenberg Blocks Collection" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("ninja-gutenberg-blocks-gutenberg-blocks-collection.php" instead of "plugin.php")
  • 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 Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin11,346 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript691,2281,2718,235
Sass23113401,973
PHP58069460
CSS86510436
Markdown1440199
SVG11024
JSON10019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
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%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/blocks/block-profile/image/social-bg.png3.56KB3.33KB▼ 6.58%