84% nova-blocks

Code Review | Nova Blocks by Pixelgrade

WordPress plugin Nova Blocks by Pixelgrade scored84%from 54 tests.

About plugin

  • Plugin page: nova-blocks
  • Plugin version: 2.1.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2.0
  • WordPress version: 6.3.1
  • First release: Jul 25, 2019
  • Latest release: Apr 6, 2023
  • Number of updates: 134
  • Update frequency: every 10.1 days
  • Top authors: pixelgrade (82.09%)babbardel (14.18%)gorby31 (5.22%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /35,419 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.38MB] [CPU: ▲0.34ms] Passed 4 tests

Analyzing server-side resources used by Nova Blocks by Pixelgrade
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4750.44 ▲5.84
Dashboard /wp-admin3.67 ▲0.3353.56 ▼13.24
Posts /wp-admin/edit.php3.73 ▲0.3754.96 ▲1.84
Add New Post /wp-admin/post-new.php7.78 ▲1.89112.29 ▲8.61
Media Library /wp-admin/upload.php3.60 ▲0.3742.43 ▲6.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 548 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Nova Blocks by Pixelgrade
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲20713.57 ▼0.7812.75 ▲10.9536.79 ▼5.72
Dashboard /wp-admin2,192 ▲125.61 ▼0.0190.35 ▼3.7337.91 ▼6.85
Posts /wp-admin/edit.php2,103 ▲31.99 ▼0.0238.78 ▲3.6536.73 ▲1.47
Add New Post /wp-admin/post-new.php29,672 ▲28,13725.16 ▲6.942,090.23 ▲1,434.5441.11 ▼25.97
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.0199.10 ▼10.5041.46 ▼3.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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: Call to undefined function __() in wp-content/plugins/nova-blocks/lib/patterns/headline-2.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nova-blocks/lib/patterns/posts-1.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nova-blocks/lib/patterns/posts-2.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nova-blocks/lib/rest-api.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nova-blocks/lib/patterns/testimonials-3.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nova-blocks/lib/patterns/testimonials-4.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Comment' not found in wp-content/plugins/nova-blocks/build/block-library/blocks/post-comments/lib/renderers/class-novablocks-walker-comment.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nova-blocks/lib/patterns/testimonials-1.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/nova-blocks/lib/patterns/posts-3.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/nova-blocks/lib/theme-supports.php:52

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
10 plugin tags: page builder, gutenberg blocks, page building, block enabled, posts collection...

nova-blocks/nova-blocks.php 92% from 13 tests

Analyzing the main PHP file in "Nova Blocks by Pixelgrade" version 2.1.6
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 254 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected12,116 lines of code in 359 files:
LanguageFilesBlank linesComment linesLines of code
PHP1191,8142,3916,989
JavaScript611,0104402,852
JSON61601,625
CSS7534450
SVG4300200

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity28.92
▷ Minimum class complexity7.00
▷ Maximum class complexity78.00
Average method complexity3.83
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods235
▷ Static methods218.94%
▷ Public methods16670.64%
▷ Protected methods5121.70%
▷ Private methods187.66%
Functions232
▷ Named functions22596.98%
▷ Anonymous functions73.02%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
packages/block-library/src/blocks/openhours/assets/opening_hours_scheme.png40.97KB13.46KB▼ 67.16%