72% realpress

Code Review | RealPress - Real Estate Plugin

WordPress plugin RealPress - Real Estate Plugin scored72%from 54 tests.

About plugin

  • Plugin page: realpress
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Oct 23, 2023
  • Number of updates: 25
  • Update frequency: every 17.0 days
  • Top authors: ThimPress (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,292 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.06MB] [CPU: ▲9.21ms] Passed 4 tests

Server-side resources used by RealPress - Real Estate Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.54 ▲2.0865.31 ▲24.30
Dashboard /wp-admin5.54 ▲2.2068.61 ▲6.81
Posts /wp-admin/edit.php5.16 ▲1.8147.13 ▼2.11
Add New Post /wp-admin/post-new.php8.41 ▲2.52105.02 ▲7.82
Media Library /wp-admin/upload.php5.38 ▲2.1563.82 ▲31.01
Status /wp-admin/edit-tags.php?taxonomy=realpress-status&post_type=realpress-property5.5262.08
Label /wp-admin/edit-tags.php?taxonomy=realpress-label&post_type=realpress-property5.5255.55
Location /wp-admin/edit-tags.php?taxonomy=realpress-location&post_type=realpress-property5.5055.72
Feature /wp-admin/edit-tags.php?taxonomy=realpress-feature&post_type=realpress-property5.5056.89
Type /wp-admin/edit-tags.php?taxonomy=realpress-type&post_type=realpress-property5.5053.25
Settings /wp-admin/edit-tags.php?taxonomy=realpress-type&post_type=realpress-property&page=realpress-setting5.1845.82
Energy Class /wp-admin/edit-tags.php?taxonomy=realpress-energy-class&post_type=realpress-property5.5362.22

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 611 new files
Database: no new tables, 12 new options
New WordPress options
widget_realpress_mortgage_calculator
db_upgraded
can_compress_scripts
widget_realpress_agent_search
widget_realpress_property_list
widget_recent-posts
widget_theysaidso_widget
widget_realpress-schedule-tour
widget_realpress-contact-form
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for RealPress - Real Estate Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18214.72 ▲0.317.00 ▲5.2346.07 ▲6.77
Dashboard /wp-admin2,277 ▲975.69 ▲0.0483.86 ▼1.8882.45 ▲42.83
Posts /wp-admin/edit.php2,200 ▲1002.26 ▲0.2634.54 ▼4.4535.90 ▲0.09
Add New Post /wp-admin/post-new.php1,600 ▲6922.14 ▼1.01684.07 ▲54.06168.35 ▲115.33
Media Library /wp-admin/upload.php1,493 ▲964.41 ▲0.19110.48 ▲6.0781.46 ▲29.87
Status /wp-admin/edit-tags.php?taxonomy=realpress-status&post_type=realpress-property1,4062.5034.4633.10
Label /wp-admin/edit-tags.php?taxonomy=realpress-label&post_type=realpress-property1,4032.5034.0832.92
Location /wp-admin/edit-tags.php?taxonomy=realpress-location&post_type=realpress-property1,3672.4627.7132.43
Feature /wp-admin/edit-tags.php?taxonomy=realpress-feature&post_type=realpress-property1,3672.4128.0431.59
Type /wp-admin/edit-tags.php?taxonomy=realpress-type&post_type=realpress-property1,3732.4429.9233.00
Settings /wp-admin/edit-tags.php?taxonomy=realpress-type&post_type=realpress-property&page=realpress-setting280.420.073.77
Energy Class /wp-admin/edit-tags.php?taxonomy=realpress-energy-class&post_type=realpress-property1,4772.5236.4630.53

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 12 options in the database
    • db_upgraded
    • widget_realpress-term
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_realpress-schedule-tour
    • theysaidso_admin_options
    • widget_realpress_agent_search
    • widget_realpress_mortgage_calculator
    • widget_realpress_property_list
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/realpress/views/frontend/classic/shared/pagination/loadmore/wrapper.php
    • > /wp-content/plugins/realpress/views/frontend/classic/shared/pagination/infinite-scroll/infinite-scroll.php
    • > /wp-content/plugins/realpress/views/frontend/classic/shortcodes/property-map.php
  • 132× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RealPress\\Helpers\\Forms\\AbstractForm' not found in wp-content/plugins/realpress/app/Helpers/Forms/TaxonomyPostMeta.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/realpress/views/frontend/classic/single-property/content.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/realpress/views/admin/setup/steps/general.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'RealPress\\Helpers\\Forms\\AbstractForm' not found in wp-content/plugins/realpress/app/Helpers/Forms/FloorPlan.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RealPress\\Helpers\\Template' not found in wp-content/plugins/realpress/views/frontend/classic/agent-detail/content.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RealPress\\Helpers\\Validation' not found in wp-content/plugins/realpress/views/frontend/classic/shortcodes/advanced-search/type.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RealPress\\Helpers\\Fields\\AbstractField' not found in wp-content/plugins/realpress/app/Helpers/Fields/FileUpload.php:5
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/realpress/config/widgets/terms.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/realpress/config/widgets/terms.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/realpress/views/admin/setup/steps/slug.php:8

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
    • > GET request to /wp-admin/edit-tags.php?taxonomy=realpress-type&post_type=realpress-property&page=realpress-setting
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=realpress-type&post_type=realpress-property&page=realpress-setting - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6 in realpress/assets to your readme.txt
You can take inspiration from this readme.txt

realpress/realpress.php Passed 13 tests

The primary PHP file in "RealPress - Real Estate Plugin" version 1.0.6 is used by WordPress to initiate all plugin functionality
28 characters long description:
An useful Real Estate plugin

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
There were no executable files found in this plugin154,383 lines of code in 545 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4822,03124,178102,567
PHP4243,5182,98423,981
CSS653,11226923,833
XML110203,537
JSON200365
SVG20075
Markdown15021
HTML20104

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity11.39
▷ Minimum class complexity1.00
▷ Maximum class complexity213.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces17
Interfaces0
Traits1
Classes135
▷ Abstract classes42.96%
▷ Concrete classes13197.04%
▷ Final classes00.00%
Methods766
▷ Static methods12115.80%
▷ Public methods66286.42%
▷ Protected methods8911.62%
▷ Private methods151.96%
Functions11
▷ Named functions19.09%
▷ Anonymous functions1090.91%
Constants37
▷ Global constants3389.19%
▷ Class constants410.81%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dist/css/frontend/images/layers.png0.68KB1.05KB0.00%
assets/dist/css/frontend/images/marker-icon-2x.png2.41KB2.52KB0.00%
assets/dist/css/admin/images/marker-icon.png1.43KB1.55KB0.00%
assets/dist/css/frontend/images/marker-shadow.png0.60KB1.16KB0.00%
assets/dist/css/admin/images/marker-shadow.png0.60KB1.16KB0.00%