56% essential-wp-real-estate

Code Review | Essential WP Real Estate

WordPress plugin Essential WP Real Estate scored56%from 54 tests.

About plugin

  • Plugin page: essential-wp-real...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Oct 25, 2023
  • Number of updates: 17
  • Update frequency: every 25.1 days
  • Top authors: smartdatasoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,406 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲5.93MB] [CPU: ▲29.28ms] 75% from 4 tests

Server-side resources used by Essential WP Real Estate
Please fix the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 5.93MB on /wp-admin/post-new.php?post_type=cl_cpt)
PageMemory (MB)CPU Time (ms)
Home /8.55 ▲5.0964.13 ▲25.50
Dashboard /wp-admin9.54 ▲6.1990.64 ▲29.16
Posts /wp-admin/edit.php9.66 ▲6.30109.17 ▲62.91
Add New Post /wp-admin/post-new.php12.13 ▲6.24120.03 ▲21.10
Media Library /wp-admin/upload.php9.44 ▲6.2074.71 ▲41.35
Types /wp-admin/edit-tags.php?taxonomy=listings_property&post_type=cl_cpt9.6075.80
Settings /wp-admin/edit.php?post_type=cl_cpt&page=listing_settings_func9.4470.45
Status /wp-admin/edit-tags.php?taxonomy=listing_status&post_type=cl_cpt9.6072.74
All Property Listings /wp-admin/edit.php?post_type=cl_cpt9.5375.66
Payments /wp-admin/edit.php?post_type=cl_cpt&page=cl-payment-history9.8672.52
Locations /wp-admin/edit-tags.php?taxonomy=listing_location&post_type=cl_cpt9.6071.39
Discounts /wp-admin/edit.php?post_type=cl_cpt&page=cl_discounts9.5872.67
Features /wp-admin/edit-tags.php?taxonomy=listing_features&post_type=cl_cpt9.6070.92
Add New Property Listing /wp-admin/post-new.php?post_type=cl_cpt9.6892.56

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 748 new files
Database: 3 new tables, 12 new options
New tables
wp_cl_customers
wp_cl_customermeta
wp_enquiry_message
New WordPress options
cl_admin_settings
theysaidso_admin_options
wp_cl_customermeta_db_version
widget_recent-comments
can_compress_scripts
widget_listing-search
widget_theysaidso_widget
db_upgraded
widget_listing-enquiry
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Essential WP Real Estate
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,298 ▲52717.59 ▲3.2935.98 ▲34.0640.01 ▼1.01
Dashboard /wp-admin2,471 ▲2946.53 ▲0.94106.22 ▲20.1536.31 ▼3.76
Posts /wp-admin/edit.php2,405 ▲3083.34 ▲1.4052.79 ▲17.3529.69 ▼7.24
Add New Post /wp-admin/post-new.php1,655 ▲12723.29 ▼0.08514.06 ▼68.2527.73 ▼19.79
Media Library /wp-admin/upload.php1,539 ▲1424.52 ▲0.3780.95 ▼21.1947.71 ▲4.51
Types /wp-admin/edit-tags.php?taxonomy=listings_property&post_type=cl_cpt1,5793.5742.3231.56
Settings /wp-admin/edit.php?post_type=cl_cpt&page=listing_settings_func2,1583.3741.0528.01
Status /wp-admin/edit-tags.php?taxonomy=listing_status&post_type=cl_cpt1,5513.7143.5429.71
All Property Listings /wp-admin/edit.php?post_type=cl_cpt1,4493.7143.5827.84
Payments /wp-admin/edit.php?post_type=cl_cpt&page=cl-payment-history1,4363.4240.3024.83
Locations /wp-admin/edit-tags.php?taxonomy=listing_location&post_type=cl_cpt1,5793.5342.4930.24
Discounts /wp-admin/edit.php?post_type=cl_cpt&page=cl_discounts1,3693.3640.3025.92
Features /wp-admin/edit-tags.php?taxonomy=listing_features&post_type=cl_cpt1,5513.5340.9729.08
Add New Property Listing /wp-admin/post-new.php?post_type=cl_cpt3,6728.83207.6483.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_cl_customers
    • wp_enquiry_message
    • wp_cl_customermeta
  • The uninstall procedure has failed, leaving 12 options in the database
    • widget_recent-comments
    • db_upgraded
    • cl_admin_settings
    • wp_cl_customermeta_db_version
    • cl_use_php_sessions
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wp_cl_customers_db_version
    • widget_listing-enquiry
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/essential-wp-real-estate/src/Front/Purchase/Gateways/Stripe/stripe/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/essential-wp-real-estate/src/Front/Purchase/Gateways/Stripe/stripe/vendor/stripe/stripe-php/build.php
  • 549× 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 wp_get_attachment_url() in wp-content/plugins/essential-wp-real-estate/templates/frontend/listings/dashboard/edit/featured_image.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/essential-wp-real-estate/src/Front/Purchase/Gateways/Stripe/stripe/vendor/stripe/stripe-php/lib/Exception/OAuth/ExceptionInterface.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/essential-wp-real-estate/templates/frontend/listings/dashboard/edit/url.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/essential-wp-real-estate/src/Front/Purchase/Gateways/Stripe/stripe/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPERECCP() in wp-content/plugins/essential-wp-real-estate/templates/frontend/listings/cart/cart-empty.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/essential-wp-real-estate/src/Admin/MetaBoxes/Forms/checkbox_list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/essential-wp-real-estate/src/Front/Purchase/Gateways/Stripe/stripe/includes/emails.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/essential-wp-real-estate/templates/admin/setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/essential-wp-real-estate/templates/frontend/listings/dashboard/listings.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/essential-wp-real-estate/src/Front/Purchase/Gateways/Stripe/stripe/vendor/stripe/stripe-php/lib/Customer.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #3, #4, #5, #6, #7, #8 in essential-wp-real-estate/assets to your readme.txt
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt is a good inspiration

essential-wp-real-estate/index.php 69% from 13 tests

The primary PHP file in "Essential WP Real Estate" version 1.1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.7.0" instead of "5.2")
  • Description: Please don't use more than 140 characters for the plugin description (currently 153 characters long)
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.6.0" instead of "7.2")
  • Main file name: Name the main plugin file the same as the plugin slug ("essential-wp-real-estate.php" instead of "index.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
These items require your attention
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/essential-wp-real-estate/src/Front/Purchase/Gateways/Stripe/stripe/vendor/stripe/stripe-php/data/ca-certificates.crt
67,660 lines of code in 715 files:
LanguageFilesBlank linesComment linesLines of code
PHP61610,80023,91649,159
JavaScript561,1331,2239,144
CSS205622506,749
Markdown473801,341
Sass4972623
JSON500406
SVG7160161
XML22054
make18023

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.01
▷ Minimum class complexity1.00
▷ Maximum class complexity282.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces68
Interfaces10
Traits8
Classes420
▷ Abstract classes153.57%
▷ Concrete classes40596.43%
▷ Final classes10.25%
Methods2,161
▷ Static methods1979.12%
▷ Public methods1,85485.79%
▷ Protected methods1537.08%
▷ Private methods1547.13%
Functions426
▷ Named functions40194.13%
▷ Anonymous functions255.87%
Constants800
▷ Global constants293.62%
▷ Class constants77196.38%
▷ Public constants771100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.10MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/plugins/images/marker-icon.png1.14KB1.07KB▼ 6.24%
assets/img/placeholder.png5.28KB4.04KB▼ 23.47%
assets/img/placeholder_dark.png1.71KB1.56KB▼ 8.83%
assets/img/placeholder-gallery.png70.43KB28.63KB▼ 59.35%
assets/js/img/marker.png14.64KB7.78KB▼ 46.90%