84% navthemes-gutenberg-blocks

Code Review | NavThemes Gutenberg Blocks

WordPress plugin NavThemes Gutenberg Blocks scored84%from 54 tests.

About plugin

  • Plugin page: navthemes-gutenbe...
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 26, 2018
  • Latest release: Feb 12, 2019
  • Number of updates: 5
  • Update frequency: every 16.4 days
  • Top authors: navthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,508 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.48ms] Passed 4 tests

Server-side resources used by NavThemes Gutenberg Blocks
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.94 ▼6.30
Dashboard /wp-admin3.31 ▲0.0046.07 ▼2.19
Posts /wp-admin/edit.php3.36 ▲0.0046.65 ▲4.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.25 ▼2.46
Media Library /wp-admin/upload.php3.23 ▲0.0034.08 ▲1.02

Server storage [IO: ▲10.70MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 266 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for NavThemes Gutenberg Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.224.34 ▲2.4444.22 ▼4.04
Dashboard /wp-admin2,209 ▲214.84 ▼0.04114.78 ▼0.9043.76 ▼2.64
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0236.84 ▼0.4935.57 ▼1.53
Add New Post /wp-admin/post-new.php1,533 ▲1123.23 ▲0.08616.52 ▲16.8453.09 ▲3.46
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0595.45 ▼6.5141.43 ▼0.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 95× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/navthemes-gutenberg-blocks/admin/includes/admin/views/settings-addons.php:3
    • > PHP Notice
      Undefined variable: block in wp-content/plugins/navthemes-gutenberg-blocks/template-parts/block/view/content-about.php on line 14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/navthemes-gutenberg-blocks/template-parts/block/view/content-heading.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/navthemes-gutenberg-blocks/template-parts/block/view/content-team.php:18
    • > PHP Notice
      Undefined variable: group_id in wp-content/plugins/navthemes-gutenberg-blocks/admin/includes/admin/views/html-location-group.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/navthemes-gutenberg-blocks/admin/includes/fields/class-acf-field-separator.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/navthemes-gutenberg-blocks/admin/includes/fields/class-acf-field-wysiwyg.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/navthemes-gutenberg-blocks/admin/includes/admin/views/html-location-rule.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/navthemes-gutenberg-blocks/admin/includes/upgrades.php:450
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/navthemes-gutenberg-blocks/admin/includes/fields/class-acf-field-password.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: blocks, gutenberg, comments, gutenberg-blocks

navthemes-gutenberg-blocks/navthemes-gtblocks.php 85% from 13 tests

"NavThemes Gutenberg Blocks" version 2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("navthemes-gutenberg-blocks.php" instead of "navthemes-gtblocks.php")
  • 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
Good job! No executable or dangerous file extensions detected95,228 lines of code in 210 files:
LanguageFilesBlank linesComment linesLines of code
PO File2820,80033,63843,399
JavaScript187,2837,40223,548
PHP14515,13519,61221,352
CSS172699456,775
JSON100124
SVG118030

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity14.78
▷ Minimum class complexity1.00
▷ Maximum class complexity124.00
Average method complexity2.98
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes114
▷ Abstract classes00.00%
▷ Concrete classes114100.00%
▷ Final classes00.00%
Methods794
▷ Static methods00.00%
▷ Public methods794100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions399
▷ Named functions39899.75%
▷ Anonymous functions10.25%
Constants7
▷ Global constants7100.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
13 compressed PNG files occupy 1.26MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/inc/datepicker/images/ui-bg_highlight-soft_0_ffffff_1x100.png0.08KB0.08KB0.00%
admin/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
admin/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png3.68KB4.17KB0.00%
admin/assets/inc/select2/3/select2x2.png0.64KB0.77KB0.00%
admin/assets/images/acf-logo.png3.40KB3.39KB0.23%