10% average-travel-costs

Code Review | Average Travel Costs

WordPress plugin Average Travel Costs scored 10% from 54 tests.

About plugin

  • Plugin page: average-travel-costs
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.0-5.6
  • WordPress version: 6.3.1
  • First release: Jan 15, 2019
  • Latest release: Nov 24, 2020
  • Number of updates: 14
  • Update frequency: every 48.8 days
  • Top authors: budgetyourtrip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,696 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin did not install without errors
    • > Parse error in wp-content/plugins/average-travel-costs/budgetyourtrip-costs.php+145
    syntax error, unexpected 'echo' (T_ECHO), expecting function (T_FUNCTION) or const (T_CONST)

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

A check of server-side resources used by Average Travel Costs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.96 ▲0.60
Dashboard /wp-admin3.31 ▲0.0044.31 ▼3.68
Posts /wp-admin/edit.php3.36 ▲0.0045.45 ▲0.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.48 ▼1.36
Media Library /wp-admin/upload.php3.23 ▲0.0035.17 ▼2.26

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Average Travel Costs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.21 ▼0.091.58 ▼0.0936.17 ▼8.13
Dashboard /wp-admin2,209 ▼04.91 ▼1.0096.43 ▼0.7337.57 ▲2.20
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0639.35 ▲4.0935.58 ▲2.29
Add New Post /wp-admin/post-new.php1,514 ▼2017.73 ▼5.37665.66 ▲1.3860.32 ▲3.17
Media Library /wp-admin/upload.php1,385 ▼04.25 ▲0.05102.65 ▼6.7045.03 ▼1.74

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Parse error
      syntax error, unexpected 'echo' (T_ECHO), expecting function (T_FUNCTION) or const (T_CONST) in wp-content/plugins/average-travel-costs/budgetyourtrip-costs.php on line 145

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: travel costs, country, travel, gutenberg, blocks...

average-travel-costs/budgetyourtrip-costs.php 92% from 13 tests

"Average Travel Costs" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("average-travel-costs.php" instead of "budgetyourtrip-costs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin882 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript39024426
PHP18147310
SVG10075
CSS37271

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.39MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png42.50KB12.79KB▼ 69.89%
screenshot-2.png41.15KB13.36KB▼ 67.54%
budgetyourtrip_widget_preview.png16.77KB6.25KB▼ 62.72%
screenshot-5.png69.27KB19.80KB▼ 71.41%
screenshot-1.png132.10KB35.30KB▼ 73.28%