10% intellectual-property-basic

Code Review | IProperty Real Estate Agent

WordPress plugin IProperty Real Estate Agent scored 10% from 54 tests.

About plugin

  • Plugin page: intellectual-prop...
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 17, 2013
  • Latest release: Jul 9, 2013
  • Number of updates: 19
  • Update frequency: every 4.4 days
  • Top authors: andyadams (84.21%)thinkeryllc (21.05%)

Code review

54 tests

User reviews

13 reviews

Install metrics

10+ active / 8,234 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
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/intellectual-property-basic/taxonomies/amenity/setup.php+60
    Declaration of IProperty_Amenity_Checklist::start_el(&$output, $category, $depth, $args, $id = 0) should be compatible with Walker_Category_Checklist::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)

Server metrics [RAM: ▼1.53MB] [CPU: ▼51.45ms] Passed 4 tests

Server-side resources used by IProperty Real Estate Agent
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.45 ▼1.017.03 ▼34.81
Dashboard /wp-admin2.47 ▼0.838.94 ▼41.95
Posts /wp-admin/edit.php2.48 ▼0.889.47 ▼45.16
Add New Post /wp-admin/post-new.php2.47 ▼3.418.30 ▼83.89
Media Library /wp-admin/upload.php2.47 ▼0.7610.09 ▼28.55
Property Categories /wp-admin/edit-tags.php?taxonomy=property-category&post_type=property2.488.62
Property Amenities /wp-admin/edit-tags.php?taxonomy=property-amenity&post_type=property2.4810.95
Property /wp-admin/admin.php?page=iproperty-settings-property2.489.65
General /wp-admin/admin.php?page=iproperty-settings-general2.489.00
Add New /wp-admin/post-new.php?post_type=property2.487.93
Companies /wp-admin/edit-tags.php?taxonomy=company2.4811.97
Property Sale Types /wp-admin/edit-tags.php?taxonomy=property-sale-type&post_type=property2.487.87
Featured /wp-admin/admin.php?page=iproperty-settings-featured2.489.27
Currency /wp-admin/admin.php?page=iproperty-settings-currency2.489.00
All Properties /wp-admin/edit.php?post_type=property2.4810.78

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 124 new files
Database: 1 new table, 10 new options
New tables
wp_iproperty_properties
New WordPress options
property-amenity_children
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
iproperty_db_version
iproperty_options
widget_recent-comments
property-category_children

Browser metrics Passed 4 tests

A check of browser resources used by IProperty Real Estate Agent
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,136 ▲34713.69 ▲0.4410.50 ▲8.6642.08 ▲1.14
Dashboard /wp-admin2,315 ▲1094.88 ▼1.01109.56 ▲1.7142.04 ▲1.48
Posts /wp-admin/edit.php2,201 ▲1122.06 ▲0.0039.35 ▲0.3537.02 ▲2.25
Add New Post /wp-admin/post-new.php1,631 ▲8617.97 ▼5.27686.93 ▲19.3346.20 ▼12.86
Media Library /wp-admin/upload.php1,497 ▲1094.21 ▲0.0498.14 ▼14.5241.52 ▼8.62
Property Categories /wp-admin/edit-tags.php?taxonomy=property-category&post_type=property1,6292.1037.7633.33
Property Amenities /wp-admin/edit-tags.php?taxonomy=property-amenity&post_type=property2,6442.1427.4939.73
Property /wp-admin/admin.php?page=iproperty-settings-property9471.9435.0325.12
General /wp-admin/admin.php?page=iproperty-settings-general1,1541.9340.6728.38
Add New /wp-admin/post-new.php?post_type=property4,0328.54214.1773.15
Companies /wp-admin/edit-tags.php?taxonomy=company1,4592.1039.1132.99
Property Sale Types /wp-admin/edit-tags.php?taxonomy=property-sale-type&post_type=property1,7322.1428.4437.31
Featured /wp-admin/admin.php?page=iproperty-settings-featured1,0961.8634.1928.69
Currency /wp-admin/admin.php?page=iproperty-settings-currency1,3731.8126.5329.50
All Properties /wp-admin/edit.php?post_type=property1,2791.9533.7333.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/intellectual-property-basic/taxonomies/amenity/setup.php+60
    Declaration of IProperty_Amenity_Checklist::start_el(&$output, $category, $depth, $args, $id = 0) should be compatible with Walker_Category_Checklist::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • iproperty_options
    • property-amenity_children
    • property-category_children
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=property
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/intellectual-property-basic/taxonomies/amenity/setup.php+60
    Declaration of IProperty_Amenity_Checklist::start_el(&$output, $category, $depth, $args, $id = 0) should be compatible with Walker_Category_Checklist::start_el(&$output, $data_object, $depth = 0, $args = Array, $current_object_id = 0)
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=property
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/intellectual-property-basic/vendor/struts/classes/struts/option/select.php+33
    Declaration of IProperty_Struts_Option_Select::customizer_control_options($setting_name, $priority) should be compatible with IProperty_Struts_Option::customizer_control_options($setting_name, $priority = 1000)
  • 33 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=iproperty-settings-currency
    • > Notice in wp-content/plugins/intellectual-property-basic/vendor/struts/classes/struts/option.php+124
    Only variables should be passed by reference
    • > GET request to /wp-admin/edit.php?post_type=property
    • > Warning in wp-includes/class-wp-hook.php+310
    Parameter 2 to iproperty_property_admin_orderby() expected to be a reference, value given

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
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/intellectual-property-basic/views/single_property/top_tabs/_gallery.php
    • > /wp-content/plugins/intellectual-property-basic/views/single_property/top_tabs/_street_view.php
    • > /wp-content/plugins/intellectual-property-basic/endpoints/currency_convert.php
  • 56× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/intellectual-property-basic/taxonomies/sale_type/setup.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function iproperty_get_current_property() in wp-content/plugins/intellectual-property-basic/views/_compact_property.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function iproperty_main_container_class() in wp-content/plugins/intellectual-property-basic/views/single_property.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'IProperty_Struts_Option' not found in wp-content/plugins/intellectual-property-basic/vendor/struts/classes/struts/option/select.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory_uri() in wp-content/plugins/intellectual-property-basic/vendor/struts/config.example.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'IProperty_Struts_Option' not found in wp-content/plugins/intellectual-property-basic/vendor/struts/classes/struts/option/text.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function iproperty_get_current_agent() in wp-content/plugins/intellectual-property-basic/views/_agent_details.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/intellectual-property-basic/views/_filter_companies.php:2
    • > PHP Notice
      Undefined variable: images in wp-content/plugins/intellectual-property-basic/views/single_property/top_tabs/_gallery.php on line 2
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/intellectual-property-basic/vendor/struts/templates/default.php on line 3

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)
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=company
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=company
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/intellectual-property-basic/vendor/Tax-Meta-Class/Tax-meta-class/js/tax-meta-clss.js:135:22)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=company
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?sensor=false&ver=6.3.1 208:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: iproperty, estate agency, real estate, realestate, property...

intellectual-property-basic/iproperty.php 85% from 13 tests

The primary PHP file in "IProperty Real Estate Agent" version 0.2.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("intellectual-property-basic.php" instead of "iproperty.php")
  • Description: The description should be shorter than 140 characters (currently 343 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected11,669 lines of code in 92 files:
LanguageFilesBlank linesComment linesLines of code
PHP711,5991,3337,123
JavaScript134595282,539
CSS67982311,175
PO File1380425786
Markdown119046

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity21.06
▷ Minimum class complexity1.00
▷ Maximum class complexity201.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods211
▷ Static methods41.90%
▷ Public methods18286.26%
▷ Protected methods2913.74%
▷ Private methods00.00%
Functions214
▷ Named functions214100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
26 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon-table-sort.png2.96KB0.33KB▼ 88.90%
stylesheets/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
images/map-preview.png0.57KB0.54KB▼ 5.81%
images/property-preview.png0.34KB0.34KB0.00%
stylesheets/images/calendar.png0.58KB0.61KB0.00%