83% tour-operator-special-offers

Code Review | LSX Tour Operator Specials

WordPress plugin LSX Tour Operator Specials scored83%from 54 tests.

About plugin

  • Plugin page: tour-operator-spe...
  • Plugin version: 1.3.6
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Apr 5, 2018
  • Latest release: Aug 10, 2023
  • Number of updates: 25
  • Update frequency: every 78.1 days
  • Top authors: feedmymedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,653 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼1.99ms] Passed 4 tests

Analyzing server-side resources used by LSX Tour Operator Specials
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2441.75 ▲2.12
Dashboard /wp-admin3.53 ▲0.2345.22 ▼1.67
Posts /wp-admin/edit.php3.65 ▲0.2950.84 ▼3.14
Add New Post /wp-admin/post-new.php6.11 ▲0.2384.22 ▼5.25
Media Library /wp-admin/upload.php3.46 ▲0.2336.43 ▲3.32

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

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

Browser metrics Passed 4 tests

Checking browser requirements for LSX Tour Operator Specials
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.53 ▼0.841.76 ▼0.2843.77 ▲2.02
Dashboard /wp-admin2,206 ▲514.86 ▼0.83113.82 ▲4.6043.62 ▲2.97
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0141.19 ▲3.4535.79 ▲0.79
Add New Post /wp-admin/post-new.php1,514 ▼1917.66 ▼5.77679.24 ▼30.1854.79 ▲0.71
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0295.55 ▼15.2740.65 ▼6.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/tour-operator-special-offers/includes/metaboxes/config-special.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lsx_to_is_single_disabled() in wp-content/plugins/tour-operator-special-offers/templates/content-widget-special.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_TO_Schema_Graph_Piece' not found in wp-content/plugins/tour-operator-special-offers/classes/class-to-specials-schema.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tour-operator-special-offers/classes/class-to-specials.php:104
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_TO_Specials' not found in wp-content/plugins/tour-operator-special-offers/classes/class-to-specials-frontend.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lsx_entry_before() in wp-content/plugins/tour-operator-special-offers/templates/content-special.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_TO_Specials' not found in wp-content/plugins/tour-operator-special-offers/classes/class-to-specials-admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/tour-operator-special-offers/includes/partials/special.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_TO_Specials' not found in wp-content/plugins/tour-operator-special-offers/classes/class-specials-schema.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/tour-operator-special-offers/templates/archive-special.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: The official readme.txt is a good inspiration

tour-operator-special-offers/to-specials.php 77% from 13 tests

The main file in "LSX Tour Operator Specials" v. 1.3.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tour-operator-special-offers.php" instead of "to-specials.php")
  • Description: The description should be shorter than 140 characters (currently 210 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,827 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP183274921,408
YAML450185
PO File17173156
XML113944
JavaScript151234

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity26.33
▷ Minimum class complexity4.00
▷ Maximum class complexity68.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods50
▷ Static methods00.00%
▷ Public methods50100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin