83% wp-travel-blocks

Code Review | WP Travel Gutenberg Blocks

WordPress plugin WP Travel Gutenberg Blocks scored83%from 54 tests.

About plugin

  • Plugin page: wp-travel-blocks
  • Plugin version: 3.3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 29, 2019
  • Latest release: Nov 6, 2023
  • Number of updates: 67
  • Update frequency: every 24.7 days
  • Top authors: wptravel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active /12,140 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.56ms] Passed 4 tests

This is a short check of server-side resources used by WP Travel Gutenberg Blocks
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0634.04 ▼7.60
Dashboard /wp-admin3.37 ▲0.0645.87 ▼2.58
Posts /wp-admin/edit.php3.42 ▲0.0649.47 ▼3.07
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.56 ▼4.48
Media Library /wp-admin/upload.php3.29 ▲0.0630.11 ▼3.08

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 394 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Travel Gutenberg Blocks: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.34 ▼0.001.62 ▼0.1439.54 ▼5.90
Dashboard /wp-admin2,195 ▲185.68 ▲0.0383.65 ▼16.2340.76 ▼6.34
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0639.70 ▲1.3937.46 ▲3.83
Add New Post /wp-admin/post-new.php1,531 ▲523.30 ▲0.47611.84 ▼114.3954.59 ▼3.19
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.1099.31 ▲2.7043.03 ▼1.65

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/wp-travel-blocks/inc/importer/parsers.php:9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/import.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-travel-blocks/inc/importer/importer.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-travel-blocks/inc/block-render/trip-slider.php:186
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/import.php): failed to open stream: No such file or directory in wp-content/plugins/wp-travel-blocks/inc/importer/importer.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-travel-blocks/inc/layouts/grid-layouts/layout-two.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-travel-blocks/inc/block-render/trip-gallery.php:126
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-travel-blocks/inc/importer/importer.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-travel-blocks/inc/layouts/grid-layouts/layout-three.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-travel-blocks/inc/layouts/grid-layouts/layout-four.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-travel-blocks/inc/class-templates.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6 in wp-travel-blocks/assets to your readme.txt
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
The official readme.txt might help

wp-travel-blocks/wp-travel-blocks.php 92% from 13 tests

Analyzing the main PHP file in "WP Travel Gutenberg Blocks" version 3.3.0
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 212 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin71,288 lines of code in 256 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4413,41815,08154,795
CSS808998168,683
PHP921,1391,4026,300
JSON39001,497
SVG11013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity59.56
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity6.17
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods103
▷ Static methods32.91%
▷ Public methods7269.90%
▷ Protected methods3130.10%
▷ Private methods00.00%
Functions53
▷ Named functions5298.11%
▷ Anonymous functions11.89%
Constants2
▷ Global constants2100.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