88% travel-agency-companion

Code Review | Travel Agency Companion

WordPress plugin Travel Agency Companion scored 88% from 54 tests.

About plugin

  • Plugin page: travel-agency-com...
  • Plugin version: 1.5.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-5.8
  • WordPress version: 5.9.2
  • First release: Aug 17, 2017
  • Latest release: Dec 2, 2021
  • Number of updates: 331
  • Update frequency: every 4.7 days
  • Top authors: raratheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

6,000+ active / 131,886 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼300.90ms] Passed 4 tests

Server-side resources used by Travel Agency Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0150.44 ▲2.41
Dashboard /wp-admin3.41 ▲0.0033.36 ▲0.15
Posts /wp-admin/edit.php3.64 ▲0.0036.58 ▼0.26
Add New Post /wp-admin/post-new.php6.89 ▼0.0898.88 ▼1,195.10
Media Library /wp-admin/upload.php3.29 ▼0.0125.06 ▼8.38

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 84 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Travel Agency Companion
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲916.22 ▲0.176.43 ▲0.342.39 ▼0.68
Dashboard /wp-admin2,895 ▲376.22 ▼0.09121.30 ▼10.59156.24 ▼8.62
Posts /wp-admin/edit.php2,691 ▼33.24 ▲0.0160.14 ▼1.90136.31 ▲1.81
Add New Post /wp-admin/post-new.php1,752 ▼021.60 ▲0.59444.16 ▲12.28152.91 ▼5.63
Media Library /wp-admin/upload.php1,701 ▲65.48 ▼0.04152.04 ▲9.00189.52 ▼13.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/travel-agency-companion/admin/partials/travel-agency-companion-admin-display.php
  • 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Travel_Agency_Companion_Dummy_Array' not found in wp-content/plugins/travel-agency-companion/public/sections/deals.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-agency-companion/includes/class-travel-agency-companion-customizer.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/travel-agency-companion/public/sections/about.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-agency-companion/includes/widgets/widget-featured.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-agency-companion/includes/widgets/widget-popular-post.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Travel_Agency_Companion_Dummy_Array' not found in wp-content/plugins/travel-agency-companion/public/sections/stats.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/travel-agency-companion/includes/widgets/widget-recent-post.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Travel_Agency_Companion_Dummy_Array' not found in wp-content/plugins/travel-agency-companion/public/sections/activities.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Travel_Agency_Companion_Dummy_Array' not found in wp-content/plugins/travel-agency-companion/public/sections/popular.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Travel_Agency_Companion_Dummy_Array' not found in wp-content/plugins/travel-agency-companion/public/sections/featured-trip.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: toolkit, travelagency, companion, raratheme, theme

travel-agency-companion/travel-agency-companion.php 92% from 13 tests

The main PHP script in "Travel Agency Companion" version 1.5.2 is automatically included on every request by WordPress
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.6" instead of "4.3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin12,185 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP306591,1335,432
JavaScript145712154,344
CSS6277562,039
XML100370

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity13.78
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods73
▷ Static methods22.74%
▷ Public methods6487.67%
▷ Protected methods34.11%
▷ Private methods68.22%
Functions34
▷ Named functions3397.06%
▷ Anonymous functions12.94%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin