10% canadian-real-estate-agent-property-sync

Code Review | CREA Property synchronizer

WordPress plugin CREA Property synchronizer scored10%from 54 tests.

About plugin

  • Plugin page: canadian-real-est...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.2-3.8
  • WordPress version: 6.3.1
  • First release: Mar 18, 2014
  • Latest release: Mar 19, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: PurpleTurtlePro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /968 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/class/crea-sync-api.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; creasync_api has a deprecated constructor

Server metrics [RAM: ▼1.86MB] [CPU: ▼57.85ms] Passed 4 tests

This is a short check of server-side resources used by CREA Property synchronizer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.335.35 ▼43.50
Dashboard /wp-admin2.15 ▼1.159.13 ▼46.02
Posts /wp-admin/edit.php2.16 ▼1.216.75 ▼48.31
Add New Post /wp-admin/post-new.php2.16 ▼3.745.81 ▼93.55
Media Library /wp-admin/upload.php2.16 ▼1.088.01 ▼28.89
All Properties /wp-admin/edit.php?post_type=property2.165.60
CREA Property synchronizer /wp-admin/options-general.php?page=creasync2.165.64
Location /wp-admin/edit-tags.php?taxonomy=locations&post_type=property2.167.00
Amenity /wp-admin/edit-tags.php?taxonomy=amenities&post_type=property2.166.52
Add New /wp-admin/post-new.php?post_type=property2.167.11
Property Type /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property2.168.32

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 272 new files
Database: no new tables, 13 new options
New WordPress options
creasync_sync_delay
creasync_localkey
creasync_status
creasync_api_password
widget_recent-posts
creasync_licensekey
theysaidso_admin_options
db_upgraded
creasync_api_username
widget_recent-comments
...

Browser metrics Passed 4 tests

CREA Property synchronizer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.31 ▼0.101.69 ▲0.0244.57 ▲3.48
Dashboard /wp-admin2,233 ▲565.54 ▼0.12119.86 ▲31.8163.52 ▲16.57
Posts /wp-admin/edit.php2,159 ▲592.63 ▲0.6747.19 ▲6.2536.73 ▼0.58
Add New Post /wp-admin/post-new.php1,597 ▲6023.77 ▲5.41797.25 ▲176.9237.83 ▼23.86
Media Library /wp-admin/upload.php1,450 ▲475.15 ▲0.77124.54 ▲23.8375.86 ▲29.92
All Properties /wp-admin/edit.php?post_type=property1,1702.5640.7330.18
CREA Property synchronizer /wp-admin/options-general.php?page=creasync1,0462.6735.1125.50
Location /wp-admin/edit-tags.php?taxonomy=locations&post_type=property1,3242.4936.3731.07
Amenity /wp-admin/edit-tags.php?taxonomy=amenities&post_type=property1,3242.5036.9231.22
Add New /wp-admin/post-new.php?post_type=property2,9088.34189.41139.00
Property Type /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property1,3272.4934.1530.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/class/crea-sync-api.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; creasync_api has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 13 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • creasync_api_password
    • creasync_licensekey
    • creasync_environment_url
    • creasync_sync_delay
    • creasync_status
    • widget_recent-comments
    • db_upgraded
    • creasync_localkey
    • ...

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
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/class/crea-sync-api.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; creasync_api has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/libraries/phrets.php+5
    Methods with the same name as their class will not be constructors in a future version of PHP; phRETS has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/wpalchemy/MetaBox.php+55
    Methods with the same name as their class will not be constructors in a future version of PHP; Creasync_WPAlchemy_MetaBox has a deprecated constructor
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Warning in wp-content/plugins/canadian-real-estate-agent-property-sync/crea-sync.php+50
    Use of undefined constant creasync_deactivate - assumed 'creasync_deactivate' (this will throw an Error in a future version of PHP)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Notice in wp-content/plugins/canadian-real-estate-agent-property-sync/crea-sync-settings.php+50
    Constant PURPLE_XMLS_PATH already defined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Notice in wp-content/plugins/canadian-real-estate-agent-property-sync/crea-sync-settings.php+51
    Constant PURPLE_XMLS_NAME already defined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Notice in wp-content/plugins/canadian-real-estate-agent-property-sync/crea-sync-settings.php+52
    Constant PURPLE_XMLS_URL already defined
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Creasync_WPAlchemy_MetaBox::_global_head() should not be called statically
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/wpalchemy/MetaBox.php+1516
    Non-static method Creasync_WPAlchemy_MetaBox::_is_post() should not be called statically
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/wpalchemy/MetaBox.php+1005
    Non-static method Creasync_WPAlchemy_MetaBox::_is_post_or_page() should not be called statically
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/wpalchemy/MetaBox.php+1024
    Non-static method Creasync_WPAlchemy_MetaBox::_get_current_post_type() should not be called statically
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/wpalchemy/MetaBox.php+1516
    Non-static method Creasync_WPAlchemy_MetaBox::_is_page() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Creasync_WPAlchemy_MetaBox::_global_foot() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Deprecated in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/wpalchemy/MetaBox.php+1061
    Non-static method Creasync_WPAlchemy_MetaBox::_get_post_id() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Warning in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/wpalchemy/MetaBox.php+2126
    count(): Parameter must be an array or an object that implements Countable

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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/plugins/properties/enquire.php
  • 171× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'CreasyncSandbox_SecurityPolicyInterface' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/Sandbox/SecurityPolicy.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CreasyncNode_Expression_Test' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/Node/Expression/Test/Constant.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'CreasyncTemplateInterface' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/Template.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'CreasyncNode_Expression_Unary' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/Node/Expression/Unary/Pos.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CreasyncTokenParser' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/TokenParser/Do.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'CreasyncNode_Expression' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/Node/Expression/Constant.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/plugins/shortcodes/helpers/boxes.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'CreasyncFilterInterface' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/Filter.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'CreasyncNode_Expression' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/Node/Expression/BlockReference.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'CreasyncNode' not found in wp-content/plugins/canadian-real-estate-agent-property-sync/aviators/libraries/Twig/Node/Spaceless.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Network (severe)
    wp-content/plugins/crea-sync//aviators/plugins/properties/assets/img/properties.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property_types&post_type=property
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?v=3&sensor=true&ver=6.3.1 276:267 "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"
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&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-admin/post-new.php?post_type=property:2339:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&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,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Network (severe)
    var/www/wordpress/wp-content/plugins/canadian-real-estate-agent-property-sync//aviators/plugins/shortcodes/shortcodes.js?wp-mce-49110-20201110 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: synchronization, agents, canada, property, crea...

canadian-real-estate-agent-property-sync/crea-sync.php 85% from 13 tests

The principal PHP file in "CREA Property synchronizer" v. 1.0.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 229 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("canadian-real-estate-agent-property-sync.php" instead of "crea-sync.php")

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
No dangerous file extensions were detected16,439 lines of code in 250 files:
LanguageFilesBlank linesComment linesLines of code
PHP2125,3697,29214,899
Twig2918101,139
JSON4110185
Markdown1800132
JavaScript1112549
CSS27032
HTML1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.61
▷ Minimum class complexity1.00
▷ Maximum class complexity278.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces19
Traits0
Classes169
▷ Abstract classes137.69%
▷ Concrete classes15692.31%
▷ Final classes00.00%
Methods947
▷ Static methods262.75%
▷ Public methods83788.38%
▷ Protected methods9610.14%
▷ Private methods141.48%
Functions143
▷ Named functions143100.00%
▷ Anonymous functions00.00%
Constants69
▷ Global constants3347.83%
▷ Class constants3652.17%
▷ Public constants36100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
aviators/plugins/properties/assets/img/property-tmp-small.png0.50KB0.65KB0.00%
aviators/core/plugins/settings/assets/img/icon.png3.64KB1.05KB▼ 71.24%
aviators/plugins/properties/assets/img/property-tmp-small1.png1.90KB1.90KB0.00%
aviators/plugins/shortcodes/assets/img/aviators.png1.94KB1.06KB▼ 45.25%
aviators/plugins/shortcodes/assets/img/span4.png3.10KB0.37KB▼ 88.15%