10% online-pre-travel-shopping

Code Review | Online Pre-Travel Shopping

WordPress plugin Online Pre-Travel Shopping scored10%from 54 tests.

About plugin

  • Plugin page: online-pre-travel...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 9, 2015
  • Latest release: Mar 1, 2015
  • Number of updates: 8
  • Update frequency: every 6.4 days
  • Top authors: shopnfly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,105 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Parse error in wp-content/plugins/online-pre-travel-shopping/widget/sftsWidget.php+37
    syntax error, unexpected '}', expecting end of file

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

Server-side resources used by Online Pre-Travel Shopping
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.59 ▼5.19
Dashboard /wp-admin3.31 ▲0.0044.19 ▼4.36
Posts /wp-admin/edit.php3.36 ▲0.0044.38 ▼0.63
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.70 ▼18.12
Media Library /wp-admin/upload.php3.23 ▲0.0035.21 ▲1.24

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Online Pre-Travel Shopping
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼1.061.52 ▼0.2738.22 ▼9.35
Dashboard /wp-admin2,206 ▲305.79 ▼0.1294.53 ▼18.1237.89 ▼9.87
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0635.33 ▼1.8833.74 ▼0.93
Add New Post /wp-admin/post-new.php1,537 ▲918.19 ▲0.09594.56 ▼8.4755.57 ▼11.66
Media Library /wp-admin/upload.php1,382 ▼04.22 ▲0.0298.05 ▼2.5941.95 ▼0.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/online-pre-travel-shopping/views/admin/demo/narrow.php
    • > /wp-content/plugins/online-pre-travel-shopping/views/admin/demo/rectangle.php
    • > /wp-content/plugins/online-pre-travel-shopping/views/admin/demo/dynamic.php
    • > /wp-content/plugins/online-pre-travel-shopping/views/admin/demo_page.php
    • > /wp-content/plugins/online-pre-travel-shopping/views/admin/demo/wide.php
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant SF_TRAVELSHOPPING_ABSPATH - assumed 'SF_TRAVELSHOPPING_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/online-pre-travel-shopping/views/admin/demo_page.php on line 17
    • > PHP Warning
      include(): Failed opening 'SF_TRAVELSHOPPING_ABSPATHviews/admin/demo/dynamic.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/online-pre-travel-shopping/views/admin/demo_page.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/online-pre-travel-shopping/views/front/search_form.php:2
    • > PHP Warning
      include(SF_TRAVELSHOPPING_ABSPATHviews/admin/demo/narrow.php): failed to open stream: No such file or directory in wp-content/plugins/online-pre-travel-shopping/views/admin/demo_page.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/online-pre-travel-shopping/views/admin/settings.php:11
    • > PHP Parse error
      syntax error, unexpected '}', expecting end of file in wp-content/plugins/online-pre-travel-shopping/widget/sftsWidget.php on line 37
    • > PHP Warning
      Use of undefined constant SF_TRAVELSHOPPING_ABSPATH - assumed 'SF_TRAVELSHOPPING_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/online-pre-travel-shopping/views/admin/demo_page.php on line 22
    • > PHP Warning
      include(SF_TRAVELSHOPPING_ABSPATHviews/admin/demo/rectangle.php): failed to open stream: No such file or directory in wp-content/plugins/online-pre-travel-shopping/views/admin/demo_page.php on line 7
    • > PHP Warning
      include(): Failed opening 'SF_TRAVELSHOPPING_ABSPATHviews/admin/demo/rectangle.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/online-pre-travel-shopping/views/admin/demo_page.php on line 7
    • > PHP Warning
      Use of undefined constant SF_TRAVELSHOPPING_ABSPATH - assumed 'SF_TRAVELSHOPPING_ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/online-pre-travel-shopping/views/admin/demo_page.php on line 7

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 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
Please take inspiration from this readme.txt

online-pre-travel-shopping/shopnfly-onlinepre-travelshopping.php 85% from 13 tests

The main PHP file in "Online Pre-Travel Shopping" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("online-pre-travel-shopping.php" instead of "shopnfly-onlinepre-travelshopping.php")
  • Description: The description should be shorter than 140 characters (currently 448 characters long)

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 plugin2,778 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS354901,303
PHP126761651
JavaScript32825495
PO File5100108315
SVG10014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.08
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 0.72MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png253.95KB65.95KB▼ 74.03%
assets/icon-128x128.png18.60KB5.50KB▼ 70.43%
assets/screenshot-5.png45.10KB12.64KB▼ 71.97%
images/flight_to.png1.65KB0.54KB▼ 67.18%
images/marker.png0.64KB0.71KB0.00%