66% rentpress-for-websites

Code Review | RentPress for Websites

WordPress plugin RentPress for Websites scored66%from 54 tests.

About plugin

  • Plugin page: rentpress-for-web...
  • Plugin version: 7.11.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Feb 23, 2022
  • Latest release: Nov 8, 2023
  • Number of updates: 68
  • Update frequency: every 9.4 days
  • Top authors: ryanmarch (76.47%)30lines (25%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /7,857 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼8.42ms] Passed 4 tests

A check of server-side resources used by RentPress for Websites
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6246.85 ▲10.46
Dashboard /wp-admin4.21 ▲0.8656.80 ▼2.84
Posts /wp-admin/edit.php4.28 ▲0.9255.53 ▲7.59
Add New Post /wp-admin/post-new.php4.22 ▼1.6739.89 ▼45.07
Media Library /wp-admin/upload.php4.05 ▲0.8141.90 ▲6.63
Pet Policy /wp-admin/edit-tags.php?taxonomy=pet&post_type=rentpress_property4.2944.22
All Neighborhoods /wp-admin/edit.php?post_type=rentpress_hood4.3845.60
Property Types /wp-admin/edit-tags.php?taxonomy=property_type&post_type=rentpress_property4.2943.45
All Properties /wp-admin/edit.php?post_type=rentpress_property4.3977.04
Cities /wp-admin/edit-tags.php?taxonomy=city&post_type=rentpress_property4.2944.71
Add New /wp-admin/post-new.php?post_type=rentpress_property4.2241.18
Features /wp-admin/edit-tags.php?taxonomy=feature&post_type=rentpress_floorplan4.2947.84
Amenities /wp-admin/edit-tags.php?taxonomy=amenity&post_type=rentpress_property4.2940.47
All Floor Plans /wp-admin/edit.php?post_type=rentpress_floorplan4.3947.63
Add New /wp-admin/post-new.php?post_type=rentpress_floorplan4.2341.08

Server storage [IO: ▲17.83MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 95 new files
Database: 4 new tables, 8 new options
New tables
wp_rentpress_floorplans
wp_rentpress_properties
wp_rentpress_refresh
wp_rentpress_units
New WordPress options
widget_recent-posts
can_compress_scripts
rentpress_plugin_version
rentpress_plugin_last_sync_attempt
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by RentPress for Websites
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,060 ▲29815.00 ▲0.651.72 ▲0.0943.90 ▲5.95
Dashboard /wp-admin2,441 ▲2636.30 ▲0.60122.33 ▲12.9289.01 ▲47.76
Posts /wp-admin/edit.php2,387 ▲2843.45 ▲1.3653.13 ▲11.7470.73 ▲36.64
Add New Post /wp-admin/post-new.php1,784 ▲24722.68 ▼0.49674.25 ▲13.7631.10 ▼24.26
Media Library /wp-admin/upload.php1,524 ▲1214.20 ▲0.0387.99 ▼10.8182.12 ▲40.22
Pet Policy /wp-admin/edit-tags.php?taxonomy=pet&post_type=rentpress_property1,5613.2849.3877.53
All Neighborhoods /wp-admin/edit.php?post_type=rentpress_hood1,3823.4248.4272.31
Property Types /wp-admin/edit-tags.php?taxonomy=property_type&post_type=rentpress_property1,5643.3345.2167.17
All Properties /wp-admin/edit.php?post_type=rentpress_property1,4233.4553.2555.10
Cities /wp-admin/edit-tags.php?taxonomy=city&post_type=rentpress_property1,5893.3146.9768.40
Add New /wp-admin/post-new.php?post_type=rentpress_property3,36716.78835.8366.17
Features /wp-admin/edit-tags.php?taxonomy=feature&post_type=rentpress_floorplan1,5583.2749.1061.96
Amenities /wp-admin/edit-tags.php?taxonomy=amenity&post_type=rentpress_property1,5613.3745.9272.22
All Floor Plans /wp-admin/edit.php?post_type=rentpress_floorplan1,4743.3954.7679.86
Add New /wp-admin/post-new.php?post_type=rentpress_floorplan7,07019.44736.65180.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_floorplan
    • > User notice in wp-includes/functions.php+5905
    Function register_rest_route was called incorrectly. The REST API route definition for rentpress/v1/remotesync is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_property
    • > Notice in wp-content/plugins/rentpress-for-websites/admin/posts/meta/metafields.php+196
    Undefined index: post
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_property
    • > Notice in wp-content/plugins/rentpress-for-websites/admin/posts/property/property_post_type_meta_setup.php+700
    Undefined variable: property_data
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_property
    • > Notice in wp-content/plugins/rentpress-for-websites/admin/posts/property/property_post_type_meta_setup.php+700
    Trying to get property 'property_availability_matrix' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_property
    • > Warning in wp-content/plugins/rentpress-for-websites/admin/posts/property/property_post_type_meta_setup.php+701
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_floorplan
    • > Notice in wp-content/plugins/rentpress-for-websites/admin/posts/floorplan/floorplan_post_type_meta_setup.php+297
    Undefined variable: parent_property_rent_type_selection
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_floorplan
    • > Notice in wp-content/plugins/rentpress-for-websites/admin/posts/floorplan/floorplan_post_type_meta_setup.php+475
    Trying to get property 'floorplan_parent_property_code' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_floorplan
    • > Notice in wp-content/plugins/rentpress-for-websites/admin/posts/floorplan/floorplan_post_type_meta_setup.php+477
    Trying to get property 'floorplan_code' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_floorplan
    • > Notice in wp-content/plugins/rentpress-for-websites/admin/posts/floorplan/floorplan_post_type_meta_setup.php+479
    Trying to get property 'floorplan_bedrooms' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_floorplan
    • > Notice in wp-content/plugins/rentpress-for-websites/admin/posts/floorplan/floorplan_post_type_meta_setup.php+481
    Trying to get property 'floorplan_bathrooms' of non-object

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/rentpress-for-websites/rentpress.php
  • 47× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(RENTPRESS_PLUGIN_ADMIN_TAX_DIRtaxonomy_amenity.php): failed to open stream: No such file or directory in wp-content/plugins/rentpress-for-websites/admin/taxonomy/register_rentpress_taxonomies.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rentpress-for-websites/admin/posts/neighborhood/neighborhood_post_type_meta_setup.php:144
    • > PHP Fatal error
      require_once(): Failed opening required 'RENTPRESS_PLUGIN_ADMIN_TAX_DIRtaxonomy_amenity.php' (include_path='.:/usr/share/php') in wp-content/plugins/rentpress-for-websites/admin/taxonomy/register_rentpress_taxonomies.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rentpress-for-websites/admin/taxonomy/taxonomy_property_type.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rentpress-for-websites/public/templates/taxonomy-pet.php:7
    • > PHP Warning
      require_once(RENTPRESS_PLUGIN_DATA_ACCESSdata_layer.php): failed to open stream: No such file or directory in wp-content/plugins/rentpress-for-websites/data/sync/property/manual_property_refresh.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rentpress-for-websites/public/templates/taxonomy-property_type.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/rentpress-for-websites/public/shortcodes/rentpress_shortcodes.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rentpress-for-websites/admin/posts/floorplan/floorplan_post_type_meta_setup.php:91
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rentpress-for-websites/rentpress-functions.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=rentpress_property
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=rentpress_property 322 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

rentpress-for-websites/rentpress.php 85% from 13 tests

The main PHP file in "RentPress for Websites" ver. 7.11.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 176 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("rentpress-for-websites.php" instead of "rentpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin26,468 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP511,4901,02310,517
SVG30129,433
CSS51,642385,534
JavaScript410391983
HTML1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions325
▷ Named functions31095.38%
▷ Anonymous functions154.62%
Constants25
▷ Global constants25100.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
4 compressed PNG files occupy 0.01MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/apartments-icon.png0.50KB0.51KB0.00%
admin/assets/images/default_floor_plan_image.png9.27KB10.05KB0.00%
admin/assets/images/icon.png0.30KB0.31KB0.00%
admin/assets/images/30l-square.png0.52KB0.54KB0.00%