67% opal-estate-pro

Code Review | Opal Estate Pro - Property Management and Submission

WordPress plugin Opal Estate Pro - Property Management and Submission scored67%from 54 tests.

About plugin

  • Plugin page: opal-estate-pro
  • Plugin version: 1.7.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2019
  • Latest release: Feb 11, 2023
  • Number of updates: 157
  • Update frequency: every 8.0 days
  • Top authors: wpopal (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

500+ active /27,061 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.87MB] [CPU: ▲22.38ms] 75% from 4 tests

Analyzing server-side resources used by Opal Estate Pro - Property Management and Submission
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 645.50ms on /wp-admin/edit.php?post_type=opalestate_property&page=opalestate-addons)
PageMemory (MB)CPU Time (ms)
Home /8.39 ▲4.9370.37 ▲27.16
Dashboard /wp-admin9.09 ▲5.7982.28 ▲33.66
Posts /wp-admin/edit.php9.13 ▲5.7893.25 ▲47.32
Add New Post /wp-admin/post-new.php8.95 ▲3.0669.75 ▼17.66
Media Library /wp-admin/upload.php8.94 ▲5.7180.30 ▲46.37
All Agencies /wp-admin/edit.php?post_type=opalestate_agency9.0975.97
Agent Levels /wp-admin/edit-tags.php?taxonomy=opalestate_agent_level&post_type=opalestate_agent8.9468.43
All Properties /wp-admin/edit.php?post_type=opalestate_property9.0970.19
Rating Features /wp-admin/edit.php?post_type=opalestate_rating_ft9.0968.98
Rating Features /wp-admin/edit.php?post_type=opalestate_agent_ft9.0965.82
Addons /wp-admin/edit.php?post_type=opalestate_property&page=opalestate-addons9.00645.50
Settings /wp-admin/edit.php?post_type=opalestate_property&page=opalestate-settings9.4468.95
Cities / Towns /wp-admin/edit-tags.php?taxonomy=opalestate_city&post_type=opalestate_property9.3477.05
States / Provinces /wp-admin/edit-tags.php?taxonomy=opalestate_state&post_type=opalestate_property9.3476.04
All Agents /wp-admin/edit.php?post_type=opalestate_agent9.0970.18

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 1,091 new files
Database: 4 new tables, 15 new options
New tables
wp_opalestate_message
wp_opalestate_api_keys
wp_opalestate_message_reply
wp_opalestate_usersearch
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_opalestate_featured_properties_widget
widget_opalestate_similarproperties_widget
opalestate_settings
widget_opalestate_profile_info_widget
can_compress_scripts
opalestate_use_php_sessions
...

Browser metrics Passed 4 tests

Opal Estate Pro - Property Management and Submission: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,194 ▲45915.69 ▲1.1026.82 ▲24.8338.37 ▼8.36
Dashboard /wp-admin2,373 ▲1885.30 ▼0.58112.68 ▲10.7639.55 ▼3.96
Posts /wp-admin/edit.php2,256 ▲1672.44 ▲0.4140.72 ▲3.9332.21 ▼9.86
Add New Post /wp-admin/post-new.php1,649 ▲11922.28 ▲3.91665.72 ▲50.7238.05 ▼13.75
Media Library /wp-admin/upload.php1,549 ▲1584.62 ▲0.40103.69 ▲9.1741.92 ▼0.90
All Agencies /wp-admin/edit.php?post_type=opalestate_agency1,2762.3637.3328.96
Agent Levels /wp-admin/edit-tags.php?taxonomy=opalestate_agent_level&post_type=opalestate_agent1,4342.4137.7130.40
All Properties /wp-admin/edit.php?post_type=opalestate_property1,3032.4038.2528.30
Rating Features /wp-admin/edit.php?post_type=opalestate_rating_ft1,2202.3935.2231.02
Rating Features /wp-admin/edit.php?post_type=opalestate_agent_ft1,2202.3935.6631.92
Addons /wp-admin/edit.php?post_type=opalestate_property&page=opalestate-addons1,2612.2627.3430.13
Settings /wp-admin/edit.php?post_type=opalestate_property&page=opalestate-settings2,7712.6052.0842.18
Cities / Towns /wp-admin/edit-tags.php?taxonomy=opalestate_city&post_type=opalestate_property1,8053.9555.8928.55
States / Provinces /wp-admin/edit-tags.php?taxonomy=opalestate_state&post_type=opalestate_property1,7393.8653.7527.56
All Agents /wp-admin/edit.php?post_type=opalestate_agent1,2762.3937.1028.48

Uninstaller [IO: ▲0.00MB] [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
You still need to fix the following
  • Zombie tables were found after uninstall: 4 tables
    • wp_opalestate_api_keys
    • wp_opalestate_usersearch
    • wp_opalestate_message
    • wp_opalestate_message_reply
  • Zombie WordPress options were found after uninstall: 15 options
    • db_upgraded
    • widget_opalestate_profile_info_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • opalestate_version
    • can_compress_scripts
    • widget_opalestate_search_properties_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • opalestate_use_php_sessions
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/opal-estate-pro/templates/emails/contact.php
    • > /wp-content/plugins/opal-estate-pro/templates/emails/request-reviewing.php
    • > /wp-content/plugins/opal-estate-pro/templates/elementor-templates/opalestate-map-top-search.php
    • > /wp-content/plugins/opal-estate-pro/templates/user/read-messages.php
    • > /wp-content/plugins/opal-estate-pro/templates/emails/enquiry.php
  • 358× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/opal-estate-pro/inc/vendors/cmb2-plugins/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Opalestate_Taxonomy_Categories' not found in wp-content/plugins/opal-estate-pro/templates/search-box/fields/categories.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function opalestate_load_template_path() in wp-content/plugins/opal-estate-pro/templates/single-agent/box.php:1
    • > PHP Warning
      require_once(external/OAuth.php): failed to open stream: No such file or directory in wp-content/plugins/opal-estate-pro/inc/vendors/social-login/Google/auth/apiOAuth.php on line 15
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/opal-estate-pro/inc/vendors/social-login/Google/contrib/apiGanService.php on line 15
    • > PHP Warning
      require_once(service/apiModel.php): failed to open stream: No such file or directory in wp-content/plugins/opal-estate-pro/inc/vendors/social-login/Google/contrib/apiTranslateService.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/opal-estate-pro/inc/vendors/cmb2-plugins/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/opal-estate-pro/templates/single-property/sharebox.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function opalestate_load_template_path() in wp-content/plugins/opal-estate-pro/templates/elementor-templates/opalestate-search-property-results.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'service/apiModel.php' (include_path='.:/usr/share/php') in wp-content/plugins/opal-estate-pro/inc/vendors/social-login/Google/contrib/apiBooksService.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: Please take inspiration from this readme.txt

opal-estate-pro/opal-estate-pro.php 77% from 13 tests

The principal PHP file in "Opal Estate Pro - Property Management and Submission" v. 1.7.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path must begin with a forward slash character ("/languages/")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected173,784 lines of code in 853 files:
LanguageFilesBlank linesComment linesLines of code
PHP56813,23130,19370,961
JavaScript1086,9423,91240,058
PO File12014,31518,50232,323
CSS473,8422,59621,344
SVG40128,973
Markdown226065
XML10040
JSON10013
Ruby17126
HTML1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.16
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces13
Interfaces6
Traits1
Classes854
▷ Abstract classes242.81%
▷ Concrete classes83097.19%
▷ Final classes20.24%
Methods6,724
▷ Static methods4436.59%
▷ Public methods6,34194.30%
▷ Protected methods2623.90%
▷ Private methods1211.80%
Functions336
▷ Named functions32295.83%
▷ Anonymous functions144.17%
Constants85
▷ Global constants2023.53%
▷ Class constants6576.47%
▷ Public constants65100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
62 PNG files occupy 0.21MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/8.png1.93KB0.91KB▼ 53.05%
inc/vendors/cmb2-plugins/cmb21/images/ico-delete.png0.70KB0.72KB0.00%
assets/images/placeholder.png3.25KB3.43KB0.00%
inc/vendors/cmb2-plugins/cmb2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
assets/map/market_icon.png4.30KB1.47KB▼ 65.74%