78% toristy

Code Review | Toristy

WordPress plugin Toristy scored 78% from 54 tests.

About plugin

  • Plugin page: toristy
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.6.1
  • WordPress version: 6.3.1
  • First release: May 26, 2020
  • Latest release: Feb 19, 2021
  • Number of updates: 16
  • Update frequency: every 17.1 days
  • Top authors: toristy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.32MB] [CPU: ▲19.06ms] Passed 4 tests

This is a short check of server-side resources used by Toristy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2940.15 ▼0.01
Dashboard /wp-admin3.66 ▲0.3570.68 ▲26.14
Posts /wp-admin/edit.php3.71 ▲0.3576.47 ▲29.87
Add New Post /wp-admin/post-new.php6.41 ▲0.52120.38 ▲28.08
Media Library /wp-admin/upload.php3.52 ▲0.2957.96 ▲22.02
Types /wp-admin/edit-tags.php?taxonomy=toristy-type3.6062.56
Locations /wp-admin/edit-tags.php?taxonomy=toristy-location3.6069.66
Categories /wp-admin/edit-tags.php?taxonomy=toristy-category3.6070.04
Services /wp-admin/edit.php?post_type=toristy-service3.6563.41
Dashboard /wp-admin/admin.php?page=toristy-settings3.6060.66
Providers /wp-admin/edit.php?post_type=toristy-provider3.6562.31

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 69 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
toristy-caches
theysaidso_admin_options
toristy-main-page-id
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Toristy
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲10613.29 ▼1.011.62 ▲0.0746.31 ▲6.70
Dashboard /wp-admin2,245 ▲534.85 ▼0.14109.51 ▼13.0138.83 ▼3.31
Posts /wp-admin/edit.php2,128 ▲392.05 ▲0.0639.87 ▼1.5335.67 ▲0.67
Add New Post /wp-admin/post-new.php6,663 ▲5,13023.72 ▲0.64855.09 ▲221.3162.95 ▲14.35
Media Library /wp-admin/upload.php1,427 ▲364.25 ▲0.0294.80 ▼1.9140.73 ▼1.96
Types /wp-admin/edit-tags.php?taxonomy=toristy-type1,5213.4354.4539.32
Locations /wp-admin/edit-tags.php?taxonomy=toristy-location1,5213.3940.6321.14
Categories /wp-admin/edit-tags.php?taxonomy=toristy-category1,5243.3543.9528.01
Services /wp-admin/edit.php?post_type=toristy-service1,2843.5146.0026.11
Dashboard /wp-admin/admin.php?page=toristy-settings2,4584.0867.0357.77
Providers /wp-admin/edit.php?post_type=toristy-provider1,2603.6547.7324.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • toristy-caches
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/toristy/toristy-booking-plugin.php
  • 27× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'Toristy\\Contents\\JsonClass' not found in wp-content/plugins/toristy/Sources/Contents/Service.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'Toristy\\Cores\\Admins\\AdminTab' not found in wp-content/plugins/toristy/Sources/Cores/Admins/TabServices.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Toristy\\Cores\\ShortCode' not found in wp-content/plugins/toristy/Sources/Cores/Codes/TagCode.php:12
    • > PHP Fatal error
      Trait 'Toristy\\Contents\\JsonClass' not found in wp-content/plugins/toristy/Sources/Contents/ServiceType.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/toristy/templates/search.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Toristy\\Helpers\\Data' not found in wp-content/plugins/toristy/Sources/Cores/Option.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Toristy\\Cores\\Admins\\AdminTab' not found in wp-content/plugins/toristy/Sources/Cores/Admins/TabOptions.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Toristy\\Helpers\\Populate' not found in wp-content/plugins/toristy/Sources/Helpers/Parses/FilterParse.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/toristy/templates/service.php:14
    • > PHP Fatal error
      Trait 'Toristy\\Contents\\JsonClass' not found in wp-content/plugins/toristy/Sources/Contents/ProviderRating.php on line 12

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === toristy === )
The official readme.txt is a good inspiration

toristy/toristy-booking-plugin.php 92% from 13 tests

This is the main PHP file of "Toristy" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("toristy.php" instead of "toristy-booking-plugin.php")

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
Success! There were no dangerous files found in this plugin5,718 lines of code in 63 files:
LanguageFilesBlank linesComment linesLines of code
PHP517389605,663
SVG10036
CSS61112
JavaScript50137

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity23.40
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity3.94
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces0
Traits1
Classes44
▷ Abstract classes613.64%
▷ Concrete classes3886.36%
▷ Final classes00.00%
Methods350
▷ Static methods4813.71%
▷ Public methods24068.57%
▷ Protected methods3610.29%
▷ Private methods7421.14%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png9.09KB4.41KB▼ 51.49%
assets/images/preview.png4.85KB1.67KB▼ 65.49%