66% lava-real-estate-manager

Code Review | Lava Real Estate Manager

WordPress plugin Lava Real Estate Manager scored66%from 54 tests.

About plugin

  • Plugin page: lava-real-estate-...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9.4
  • WordPress version: 6.3.1
  • First release: Jun 30, 2015
  • Latest release: Feb 27, 2018
  • Number of updates: 26
  • Update frequency: every 37.6 days
  • Top authors: lavacode (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /10,519 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.85MB] [CPU: ▲5.49ms] Passed 4 tests

Analyzing server-side resources used by Lava Real Estate Manager
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.33 ▲0.8647.94 ▲8.87
Dashboard /wp-admin4.16 ▲0.8654.22 ▲3.20
Posts /wp-admin/edit.php4.22 ▲0.8654.24 ▲8.82
Add New Post /wp-admin/post-new.php6.77 ▲0.8887.77 ▲3.44
Media Library /wp-admin/upload.php4.07 ▲0.8441.47 ▲6.49
Types /wp-admin/edit-tags.php?taxonomy=property_type&post_type=property4.0942.33
City /wp-admin/edit-tags.php?taxonomy=property_city&post_type=property4.0945.05
Add New /wp-admin/post-new.php?post_type=property3.9341.94
Keyword /wp-admin/edit-tags.php?taxonomy=property_keyword&post_type=property4.0940.70
Amenities /wp-admin/edit-tags.php?taxonomy=property_amenities&post_type=property4.0942.55
Status /wp-admin/edit-tags.php?taxonomy=property_status&post_type=property4.0942.49
All Properties /wp-admin/edit.php?post_type=property4.1443.73
Settings /wp-admin/edit.php?post_type=property&page=lava-property-settings4.1143.17

Server storage [IO: ▲0.70MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 70 new files
Database: no new tables, 9 new options
New WordPress options
widget_lava_contact_single_page
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_lava_realestate_featured
widget_lava_realestate_recents
widget_recent-posts

Browser metrics Passed 4 tests

Lava Real Estate Manager: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,121 ▲38617.48 ▲2.8013.51 ▲11.7343.14 ▼1.16
Dashboard /wp-admin2,408 ▲2237.57 ▲1.71146.94 ▲44.0444.01 ▲4.94
Posts /wp-admin/edit.php2,316 ▲2244.03 ▲1.9160.45 ▲21.9432.42 ▼2.72
Add New Post /wp-admin/post-new.php1,719 ▲19923.34 ▲0.03557.76 ▼127.8128.46 ▼29.49
Media Library /wp-admin/upload.php1,444 ▲625.36 ▲1.1387.46 ▼15.2043.03 ▼1.38
Types /wp-admin/edit-tags.php?taxonomy=property_type&post_type=property1,4843.9255.4928.88
City /wp-admin/edit-tags.php?taxonomy=property_city&post_type=property1,4903.9148.4927.46
Add New /wp-admin/post-new.php?post_type=property3,55112.59294.85173.72
Keyword /wp-admin/edit-tags.php?taxonomy=property_keyword&post_type=property1,4903.9049.1227.66
Amenities /wp-admin/edit-tags.php?taxonomy=property_amenities&post_type=property1,4903.9250.0327.62
Status /wp-admin/edit-tags.php?taxonomy=property_status&post_type=property1,5113.9550.3427.92
All Properties /wp-admin/edit.php?post_type=property1,3264.2652.1830.79
Settings /wp-admin/edit.php?post_type=property&page=lava-property-settings1,3483.8847.6356.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 9 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_lava_realestate_featured
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_lava_realestate_recents
    • widget_recent-comments
    • widget_lava_contact_single_page
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Deprecated in wp-content/plugins/lava-real-estate-manager/includes/class-core.php+649
    Function create_function() is deprecated

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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lava-real-estate-manager/templates/template-map-htmls.php
  • 51× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      constant(): Couldn't find constant Lava_RealEstate_Manager_Func::SLUG in wp-content/plugins/lava-real-estate-manager/templates/form/lava-add-item-terms.php on line 3
    • > PHP Notice
      Trying to get property 'email' of non-object in wp-content/plugins/lava-real-estate-manager/includes/widgets/html/widget-single-contact.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lava-real-estate-manager/templates/template-not-list.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/lava-real-estate-manager/templates/template-listing.php:1
    • > PHP Notice
      Undefined variable: addon in wp-content/plugins/lava-real-estate-manager/includes/admin/admin-loop-addons.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get() on null in wp-content/plugins/lava-real-estate-manager/templates/template-dashboard.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lava-real-estate-manager/includes/admin/admin-welcome.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/lava-real-estate-manager/includes/admin/admin-addons-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/lava-real-estate-manager/includes/admin/admin-mapmeta.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lava-real-estate-manager/includes/widgets/widget-recents.php:2

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)
These are user-side errors you should fix
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=property&page=lava-property-settings
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places&ver=0.0.1 234: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 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
The official readme.txt might help

lava-real-estate-manager/lava-real-estate-manager.php 92% from 13 tests

"Lava Real Estate Manager" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected11,742 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP381,1183594,561
JavaScript118019174,004
CSS48791,471
PO File3423489918
LESS15041769
SVG10019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity24.85
▷ Minimum class complexity3.00
▷ Maximum class complexity65.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods151
▷ Static methods1912.58%
▷ Public methods151100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants00.00%
▷ Class constants12100.00%
▷ Public constants12100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/no-image.png4.52KB0.89KB▼ 80.29%
assets/images/lava_btn_slide_arrow.png1.67KB0.48KB▼ 71.02%