78% travel-agency-companion

Code Review | Travel Agency Companion

WordPress plugin Travel Agency Companion scored78%from 54 tests.

About plugin

  • Plugin page: travel-agency-com...
  • Plugin version: 1.5.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2017
  • Latest release: May 2, 2023
  • Number of updates: 336
  • Update frequency: every 6.2 days
  • Top authors: raratheme (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

6,000+ active /171,960 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Travel Agency Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.10 ▼6.37
Dashboard /wp-admin3.31 ▲0.0049.29 ▼4.99
Posts /wp-admin/edit.php3.36 ▲0.0052.94 ▲2.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.81 ▼16.33
Media Library /wp-admin/upload.php3.23 ▲0.0040.52 ▲7.69

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 84 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Travel Agency Companion
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.181.85 ▲0.1641.88 ▼1.32
Dashboard /wp-admin2,206 ▲185.91 ▲0.10111.92 ▲2.7443.55 ▼3.61
Posts /wp-admin/edit.php2,086 ▼01.99 ▼0.0335.83 ▼4.7232.52 ▼6.87
Add New Post /wp-admin/post-new.php1,533 ▼023.13 ▲0.01665.59 ▲17.5062.64 ▲14.19
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.0396.58 ▼8.2944.09 ▼2.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/travel-agency-companion/admin/partials/travel-agency-companion-admin-display.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > 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: Class 'Travel_Agency_Companion_Dummy_Array' not found in wp-content/plugins/travel-agency-companion/public/sections/our-feature.php:8
    • > 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: Class 'Travel_Agency_Companion_Dummy_Array' not found in wp-content/plugins/travel-agency-companion/public/sections/featured-trip.php:7
    • > 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: Call to undefined function get_theme_mod() in wp-content/plugins/travel-agency-companion/public/sections/about.php:8
    • > 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: 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: 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 get_theme_mod() in wp-content/plugins/travel-agency-companion/public/sections/cta.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: companion, toolkit, theme, raratheme, travelagency

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

The primary PHP file in "Travel Agency Companion" version 1.5.7 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version does not match 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin12,262 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP306531,1345,494
JavaScript145712154,344
CSS6279562,054
XML100370

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 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin