79% tim-travel-information-manager

Code Review | TIM: Travel Information Manager

WordPress plugin TIM: Travel Information Manager scored79%from 54 tests.

About plugin

  • Plugin page: tim-travel-inform...
  • Plugin version: 1.5.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2020
  • Latest release: Apr 25, 2023
  • Number of updates: 58
  • Update frequency: every 16.6 days
  • Top authors: willyrios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /950 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
Installer ran successfully

Server metrics [RAM: ▲0.63MB] [CPU: ▼5.74ms] Passed 4 tests

Server-side resources used by TIM: Travel Information Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1120.41 ▼16.22
Dashboard /wp-admin4.12 ▲0.8149.92 ▲2.32
Posts /wp-admin/edit.php4.17 ▲0.8152.37 ▲8.07
Add New Post /wp-admin/post-new.php6.72 ▲0.8382.46 ▼10.87
Media Library /wp-admin/upload.php4.04 ▲0.8136.91 ▲1.80

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for TIM: Travel Information Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,201 ▲43014.48 ▲0.0913.03 ▲11.3444.98 ▲4.30
Dashboard /wp-admin2,296 ▲1054.96 ▼0.92104.76 ▲3.5675.46 ▲36.84
Posts /wp-admin/edit.php2,194 ▲1052.24 ▲0.2037.32 ▲1.8034.79 ▼1.19
Add New Post /wp-admin/post-new.php1,592 ▲6117.48 ▼1.07760.46 ▲116.8735.63 ▼23.34
Media Library /wp-admin/upload.php1,484 ▲964.37 ▲0.1998.50 ▲0.1673.02 ▲29.63

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

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tim-travel-information-manager/public/templates/checkout/payment-gateways/paypal.php
  • 209× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/tim-travel-information-manager/public/layouts/travelo/tours/detail.php on line 4
    • > PHP Notice
      Trying to get property 'price_list_id' of non-object in wp-content/plugins/tim-travel-information-manager/public/templates/cart/tim-cart-detail.php on line 12
    • > PHP Notice
      Undefined variable: item in wp-content/plugins/tim-travel-information-manager/public/layouts/argox/hotels/detail.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_miscellaneous() on null in wp-content/plugins/tim-travel-information-manager/public/templates/hotels/modals/tim-hotel-detail-modal.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tim-travel-information-manager/admin/partials/_general-options.php:28
    • > PHP Notice
      Undefined index: response in wp-content/plugins/tim-travel-information-manager/public/pages/payment/bac_process.php on line 3
    • > PHP Warning
      Use of undefined constant TIM_TRAVEL_MANAGER_POST_TYPE_PACKAGES - assumed 'TIM_TRAVEL_MANAGER_POST_TYPE_PACKAGES' (this will throw an Error in a future version of PHP) in wp-content/plugins/tim-travel-information-manager/public/templates/packages/tim-package-detail.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tim-travel-information-manager/admin/partials/_notification-options.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tim-travel-information-manager/public/layouts/travelo/tours/detail.php:38
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/tim-travel-information-manager/public/templates/checkout/payment-gateways/paypal.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: vacation packages, hotels, transportation, travel, tours

tim-travel-information-manager/tim-travel-information-manager.php Passed 13 tests

This is the main PHP file of "TIM: Travel Information Manager" version 1.5.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
38 characters long description:
Tim plugin. Travel Information Manager

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected26,898 lines of code in 231 files:
LanguageFilesBlank linesComment linesLines of code
PHP953,2181,43913,088
CSS271538364,172
JavaScript951,1655923,930
LESS89959263,412
PO File27421,9441,556
SVG301723
JSX10217

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity49.17
▷ Minimum class complexity3.00
▷ Maximum class complexity145.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods201
▷ Static methods00.00%
▷ Public methods16883.58%
▷ Protected methods199.45%
▷ Private methods146.97%
Functions19
▷ Named functions1789.47%
▷ Anonymous functions210.53%
Constants37
▷ Global constants37100.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
49 PNG files occupy 0.44MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/libs/datepicker/images/ui-icons_004276_256x240.png4.44KB4.17KB▼ 6.02%
public/layouts/argox/screenshot.png45.00KB20.10KB▼ 55.34%
public/img/bcr-payments.png5.54KB3.80KB▼ 31.28%
public/css/img/list.png0.17KB0.10KB▼ 41.01%
public/libs/fancybox/fancybox_overlay.png0.98KB0.09KB▼ 90.43%