79% nautilus-trips

Code Review | Nautilus Trips

WordPress plugin Nautilus Trips scored79%from 54 tests.

About plugin

  • Plugin page: nautilus-trips
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Sep 21, 2019
  • Latest release: Sep 7, 2023
  • Number of updates: 21
  • Update frequency: every 69.0 days
  • Top authors: nautilusadam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /798 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼12.06ms] Passed 4 tests

Analyzing server-side resources used by Nautilus Trips
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1536.72 ▼3.14
Dashboard /wp-admin3.45 ▲0.1047.11 ▼11.96
Posts /wp-admin/edit.php3.57 ▲0.2144.68 ▼6.03
Add New Post /wp-admin/post-new.php6.05 ▲0.1681.82 ▼27.10
Media Library /wp-admin/upload.php3.38 ▲0.1437.94 ▲3.94

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 38 new files
Database: 1 new table, 7 new options
New tables
wp_nautilus_trips_booking
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
nautilus_trips_page_id

Browser metrics Passed 4 tests

An overview of browser requirements for Nautilus Trips
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲13213.63 ▼0.757.59 ▲5.3838.75 ▼3.49
Dashboard /wp-admin2,226 ▲414.85 ▼0.99102.24 ▲2.1941.76 ▼1.15
Posts /wp-admin/edit.php2,106 ▲172.00 ▼0.1534.43 ▼7.5432.83 ▼3.29
Add New Post /wp-admin/post-new.php1,530 ▲1023.11 ▼0.31650.33 ▼76.4357.57 ▲3.88
Media Library /wp-admin/upload.php1,411 ▲264.19 ▼0.0198.34 ▼8.6641.87 ▼6.46

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 7× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-setup.php
    • > /wp-content/plugins/nautilus-trips/includes/class-nautilus-trips.php
    • > /wp-content/plugins/nautilus-trips/public/class-nautilus-trips-public.php
    • > /wp-content/plugins/nautilus-trips/admin/class-nautilus-trips-admin.php
    • > /wp-content/plugins/nautilus-trips/nautilus-trips.php
    • > /wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-trip.php
    • > /wp-content/plugins/nautilus-trips/admin/partials/nautilus-trips-admin-display.php
  • 17× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: trip in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-destination.php on line 26
    • > PHP Notice
      Trying to get property 'numTrips' of non-object in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-public-display.php on line 22
    • > PHP Notice
      Trying to get property 'sea' of non-object in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-destination.php on line 23
    • > PHP Notice
      Undefined variable: trip in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-destination.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-email.php:17
    • > PHP Notice
      Trying to get property 'trips' of non-object in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-public-display.php on line 20
    • > PHP Notice
      Trying to get property 'status' of non-object in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-public-display.php on line 21
    • > PHP Notice
      Undefined variable: tripData in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-public-display.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-destination.php:31
    • > PHP Notice
      Undefined variable: tripData in wp-content/plugins/nautilus-trips/public/partials/nautilus-trips-public-display.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: liveaboard, dive travel, scuba diving, travel, nautilus liveaboards

nautilus-trips/nautilus-trips.php Passed 13 tests

This is the main PHP file of "Nautilus Trips" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
116 characters long description:
This plugin allows Nautilus Dealers to readily display available trips on their website for customers to book trips.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,650 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP173327181,357
CSS2711287
JavaScript24546

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity16.71
▷ Minimum class complexity1.00
▷ Maximum class complexity41.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods47
▷ Static methods2042.55%
▷ Public methods4085.11%
▷ Protected methods00.00%
▷ Private methods714.89%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/nba-deck-1.png20.84KB8.49KB▼ 59.28%
images/nex-deck-2.png12.25KB6.27KB▼ 48.82%
images/nba-deck-2.png19.74KB8.47KB▼ 57.09%
images/nus-deck-1.png10.34KB5.06KB▼ 51.06%
images/nex-deck-3.png7.64KB4.22KB▼ 44.79%