10% 6storage-rentals

Code Review | 6Storage Rentals

WordPress plugin 6Storage Rentals scored10%from 54 tests.

About plugin

  • Plugin page: 6storage-rentals
  • Plugin version: 2.6.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2
  • WordPress version: 6.3.1
  • First release: Sep 9, 2022
  • Latest release: Nov 20, 2023
  • Number of updates: 23
  • Update frequency: every 19.1 days
  • Top authors: sixstorage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,445 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲2.85MB] [CPU: ▲12.82ms] Passed 4 tests

Analyzing server-side resources used by 6Storage Rentals
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /6.32 ▲2.8656.12 ▲14.91
Dashboard /wp-admin6.15 ▲2.8460.25 ▲14.54
Posts /wp-admin/edit.php6.26 ▲2.9058.29 ▲7.54
Add New Post /wp-admin/post-new.php8.73 ▲2.84106.36 ▲14.29
Media Library /wp-admin/upload.php6.07 ▲2.8452.61 ▲18.37
Leads /wp-admin/admin.php?page=six_storage_online_storage_option6.0444.55
6Storage /wp-admin/admin.php?page=six_storage_online_configuration_menu6.0843.75
Settings /wp-admin/admin.php?page=six_storage_online_settings_menu6.7543.48

Server storage [IO: ▲11.28MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 103 new files
Database: 1 new table, 144 new options
New tables
wp_LeadTable
New WordPress options
six_storage_online_fs_ad_vehicle_type_toggle
six_storage_online_fs_of_additional_months_is_mandatory
six_storage_online_fs_ti_address1_is_mandatory
six_storage_online_fs_ad_vehicle_licence_number_is_mandatory
six_storage_online_fs_of_key_in_safe_box_toggle
six_storage_online_fs_ti_gateaccesscode_is_mandatory
six_storage_online_fs_ad_vehicle_info_is_mandatory
widget_recent-comments
six_storage_online_fs_ti_state_is_mandatory
six_storage_online_fs_ti_phone1_toggle
...

Browser metrics Passed 4 tests

An overview of browser requirements for 6Storage Rentals
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6014.23 ▼0.041.77 ▲0.0342.49 ▼5.20
Dashboard /wp-admin2,206 ▲265.56 ▲0.0388.71 ▼10.0177.08 ▲32.60
Posts /wp-admin/edit.php2,126 ▲231.97 ▲0.0338.30 ▼1.0736.65 ▲0.15
Add New Post /wp-admin/post-new.php1,562 ▲1723.27 ▼2.10663.62 ▲27.12180.30 ▲115.83
Media Library /wp-admin/upload.php1,420 ▲234.13 ▼0.0697.78 ▲0.0860.35 ▲17.74
Leads /wp-admin/admin.php?page=six_storage_online_storage_option8731.9927.1337.43
6Storage /wp-admin/admin.php?page=six_storage_online_configuration_menu1,0603.1548.8940.60
Settings /wp-admin/admin.php?page=six_storage_online_settings_menu5,3253.8174.9371.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_LeadTable
  • This plugin did not uninstall successfully, leaving 144 options in the database
    • six_storage_online_fs_ti_identitydocument_is_mandatory
    • six_storage_online_fs_ti_taxid_toggle
    • six_storage_online_fs_ad_insurance_is_mandatory
    • six_storage_online_setup_preloader
    • six_storage_online_fc_enable_site_map_in_booking_page_toggle
    • six_storage_online_fs_ti_email_is_mandatory
    • six_storage_online_fs_ad_vehicle_licence_state_toggle
    • six_storage_online_fs_ti_address1_is_mandatory
    • six_storage_online_fs_ti_state_is_mandatory
    • six_storage_online_fs_ti_zip_postalcode_is_mandatory
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=six_storage_online_storage_option
    • > Notice in wp-content/plugins/6storage-rentals/template/admin-menu/storage.php+6
    Undefined variable: table_name
  • 21 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=six_storage_online_settings_menu
    • > Notice in wp-content/plugins/6storage-rentals/template/portal/admin-settings.php+1990
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/6storage-rentals/template/portal/discount-slidder.php
    • > /wp-content/plugins/6storage-rentals/6storage-rentals.php
  • 26× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'Toolkit\\helper\\Supports\\TableInfo' not found in wp-content/plugins/6storage-rentals/inc/helper/Supports/Six_Storage_QueryBuilder.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'SixStorageOnline\\helper\\Database\\Six_Storage_DatabaseModel' not found in wp-content/plugins/6storage-rentals/inc/models/Six_Storage_LeadTable.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SixStorageOnline\\Base\\Six_Storage_BaseController' not found in wp-content/plugins/6storage-rentals/inc/Base/Six_Storage_Enqueue.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SixStorageOnline\\Base\\Six_Storage_SettingsKeys' not found in wp-content/plugins/6storage-rentals/inc/Base/Six_Storage_MoveInControllerSixStorage.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SixStorageOnline\\Base\\Six_Storage_SettingsKeys' not found in wp-content/plugins/6storage-rentals/template/portal/admin-index.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'SixStorageOnline\\Base\\Six_Storage_SettingsKeys' not found in wp-content/plugins/6storage-rentals/template/portal/ptwofour-response.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SixStorageOnline\\Base\\Six_Storage_SettingsKeys' not found in wp-content/plugins/6storage-rentals/template/portal/sign-up.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'SixStorageOnline\\Base\\Six_Storage_BaseController' not found in wp-content/plugins/6storage-rentals/inc/Base/Six_Storage_SignUpControllerSixStorage.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SixStorageOnline\\Base\\Six_Storage_SettingsKeys' not found in wp-content/plugins/6storage-rentals/template/portal/sign-in.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/6storage-rentals/template/portal/unit-listing.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=six_storage_online_settings_menu
    • > Javascript (severe) in unknown
    /wp-content/plugins/6storage-rentals/assets/js/six-storage-admin-settings.min.js?ver=2.6.0 0:529072 Uncaught TypeError: Cannot read properties of null (reading 'timezones')
    • > GET request to /wp-admin/admin.php?page=six_storage_online_settings_menu
    • > Javascript (severe) in unknown
    /wp-content/plugins/6storage-rentals/assets/js/six-storage-admin-settings.min.js?ver=2.6.0 0:474255 Uncaught TypeError: Cannot read properties of undefined (reading 'securityGateID')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: You are using too many tags: 22 tag instead of maximum 10
Please take inspiration from this readme.txt

6storage-rentals/6storage-rentals.php 92% from 13 tests

The main PHP script in "6Storage Rentals" version 2.6.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 217 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected34,834 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PHP482,5331,25115,972
CSS42,21249315,632
JavaScript193887152,003
SVG8701,194
JSON20020
XML10013

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 133)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity79.89
▷ Minimum class complexity1.00
▷ Maximum class complexity904.00
Average method complexity8.45
▷ Minimum method complexity1.00
▷ Maximum method complexity133.00
Code structure
Namespaces11
Interfaces1
Traits2
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes14.35%
Methods300
▷ Static methods268.67%
▷ Public methods27993.00%
▷ Protected methods82.67%
▷ Private methods134.33%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants1
▷ Global constants1100.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
14 PNG files occupy 0.42MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png13.00KB6.61KB▼ 49.19%
assets/images/cranes-storage-type.png1.44KB1.48KB0.00%
assets/screenshot-2.png30.37KB12.36KB▼ 59.32%
assets/images/dummy-img-circle.png4.48KB2.50KB▼ 44.20%
assets/banner-772x250.png67.21KB27.90KB▼ 58.48%