88% youlive-to-travel

Code Review | YouLive to Travel

WordPress plugin YouLive to Travel scored 88% from 54 tests.

About plugin

  • Plugin page: youlive-to-travel
  • Plugin version: 1.13.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 5.9.2
  • First release: Jun 29, 2018
  • Latest release: Jul 13, 2018
  • Number of updates: 5
  • Update frequency: every 3.4 days
  • Top authors: youlivetotravel (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 607 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼356.31ms] Passed 4 tests

This is a short check of server-side resources used by YouLive to Travel
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1854.61 ▲4.95
Dashboard /wp-admin3.53 ▲0.1231.68 ▼2.22
Posts /wp-admin/edit.php3.75 ▲0.1135.75 ▼8.80
Add New Post /wp-admin/post-new.php7.00 ▲0.0391.39 ▼1,410.84
Media Library /wp-admin/upload.php3.40 ▲0.1123.77 ▼3.38

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for YouLive to Travel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,962 ▲20316.64 ▲1.0314.81 ▲8.922.75 ▲0.47
Dashboard /wp-admin2,915 ▲546.29 ▲0.09117.36 ▼12.04178.59 ▲20.75
Posts /wp-admin/edit.php2,712 ▲183.27 ▲0.0463.92 ▼0.74142.35 ▼0.72
Add New Post /wp-admin/post-new.php1,603 ▼15716.36 ▼0.47409.79 ▼39.34161.14 ▲1.83
Media Library /wp-admin/upload.php1,722 ▲245.54 ▲0.03122.85 ▼16.74199.39 ▼0.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/youlive-to-travel/youlive_to_travel.php
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youlive-to-travel/trip_manager/classes/class.youli_trip_manager_admin_menu.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/youlive-to-travel/trip_manager/classes/class.youli_trip_manager_scripts.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/youlive-to-travel/trip_manager/classes/class.youli_trip_manager_shortcode.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: booking, group trip, travel booking, adventure travel, youlivetotravel...

youlive-to-travel/youlive_to_travel.php 77% from 13 tests

The primary PHP file in "YouLive to Travel" version 1.13.7 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("trip-manager/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("youlive-to-travel.php" instead of "youlive_to_travel.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 709 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,552 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP78268600
CSS38211490
JavaScript38339385
SVG155077

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity20.60
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity7.12
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.40MB with 0.16MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trip_manager/images/youli-admin-icon.png0.85KB1.02KB0.00%
trip_manager/images/map.png2.64KB1.28KB▼ 51.42%
assets/screenshot-1.png402.46KB126.11KB▼ 68.67%