10% about-rentals

Code Review | About Rentals

WordPress plugin About Rentals scored 10% from 54 tests.

About plugin

  • Plugin page: about-rentals
  • Plugin version: 1.5
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.1
  • WordPress version: 5.9.2
  • First release: Dec 29, 2017
  • Latest release: Apr 12, 2019
  • Number of updates: 47
  • Update frequency: every 10.2 days
  • Top authors: whiteirondata (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 1,736 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
    • > Deprecated in wp-content/plugins/about-rentals/widget/apartment-widgets.php+223
    Function create_function() is deprecated

Server metrics [RAM: ▼1.79MB] [CPU: ▼346.37ms] Passed 4 tests

Analyzing server-side resources used by About Rentals
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.58 ▼0.937.77 ▼47.90
Dashboard /wp-admin2.60 ▼0.8112.50 ▼24.96
Posts /wp-admin/edit.php2.60 ▼1.0410.49 ▼44.89
Add New Post /wp-admin/post-new.php2.60 ▼4.377.13 ▼1,267.72
Media Library /wp-admin/upload.php2.60 ▼0.697.18 ▼19.23

Server storage [IO: ▲4.89MB] [DB: ▲0.03MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 565 new files
Database: no new tables, 22 new options
New WordPress options
apartment_monthly_rent_children
leasing_special_updated
apartment_utilities_children
community_location_children
listing_bathrooms_children
recovery_mode_email_last_sent
apartment_bedrooms_children
apartment_amenities_children
widget_apartment_filters_widget
apartment_rental_occupancy_children
...

Browser metrics Passed 4 tests

An overview of browser requirements for About Rentals
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,091 ▲34917.70 ▲2.0922.24 ▲16.7110.94 ▲8.75
Dashboard /wp-admin2,979 ▲1196.65 ▲0.51123.88 ▼1.61203.26 ▲37.51
Posts /wp-admin/edit.php2,796 ▲1023.37 ▲0.1371.78 ▲11.17164.54 ▲21.02
Add New Post /wp-admin/post-new.php45 ▼1,7070.94 ▼20.030.03 ▼490.0951.32 ▼109.04
Media Library /wp-admin/upload.php1,945 ▲2476.22 ▲0.73141.66 ▼20.23209.67 ▲18.77

Uninstaller [IO: ▲0.72MB] [DB: ▲0.03MB] 50% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/about-rentals/widget/apartment-widgets.php+223
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 22 options in the database
    • apartment_bathrooms_children
    • community_owner_children
    • community_price_updated
    • apartment_area_children
    • apartment_leasing_children
    • listing_bathrooms_children
    • recovery_mode_email_last_sent
    • apartment_monthly_rent_children
    • listing_bedrooms_children
    • community_location_children
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 67× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/about-rentals/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/about-rentals/admin/premium/realestate-listing.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/about-rentals/admin/premium/single-realestate.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/about-rentals/admin/single-community.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/about-rentals/admin/leasing-special-shortcode.php:60
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/about-rentals/cmb2/includes/types/CMB2_Type_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/about-rentals/admin/ar-virtual-tours.php:177
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/about-rentals/admin/premium/availability-manager.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/about-rentals/cmb2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/about-rentals/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt is a good inspiration

about-rentals/about-rentals.php 92% from 13 tests

The main PHP file in "About Rentals" ver. 1.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin67,410 lines of code in 353 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP982,6296,85413,268
JavaScript762,6032,35212,012
CSS291,3551,2767,782
Sass16300251,378
JSON8170393
Markdown4670180
Bourne Shell124055
SVG17019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.99
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity3.01
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes84
▷ Abstract classes89.52%
▷ Concrete classes7690.48%
▷ Final classes11.32%
Methods672
▷ Static methods11617.26%
▷ Public methods57385.27%
▷ Protected methods9614.29%
▷ Private methods30.45%
Functions131
▷ Named functions131100.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants1055.56%
▷ Class constants844.44%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
58 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
cmb2/add-on/date-range-field/assets/images/ui-bg_diagonals-thick_20_666666_40x40.png0.30KB0.15KB▼ 49.68%
cmb2/add-on/date-range-field/assets/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
img/am.png15.43KB0.19KB▼ 98.75%
cmb2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%