84% crucial-real-estate

Code Review | Crucial Real Estate

WordPress plugin Crucial Real Estate scored84%from 54 tests.

About plugin

  • Plugin page: crucial-real-estate
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4
  • WordPress version: 6.3.1
  • First release: Sep 25, 2021
  • Latest release: Nov 17, 2023
  • Number of updates: 17
  • Update frequency: every 46.1 days
  • Top authors: aarambhathemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active /6,441 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.54MB] [CPU: ▲15.53ms] Passed 4 tests

This is a short check of server-side resources used by Crucial Real Estate
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.97 ▲1.5054.71 ▲14.63
Dashboard /wp-admin4.89 ▲1.5466.54 ▲6.56
Posts /wp-admin/edit.php4.94 ▲1.5874.55 ▲29.62
Add New Post /wp-admin/post-new.php7.75 ▲1.86105.97 ▲15.06
Media Library /wp-admin/upload.php4.75 ▲1.5358.57 ▲25.86
New Property /wp-admin/post-new.php?post_type=property7.89107.99
Property Features /wp-admin/edit-tags.php?taxonomy=property-feature&post_type=property4.7862.54
Property Statuses /wp-admin/edit-tags.php?taxonomy=property-status&post_type=property4.7855.39
All Properties /wp-admin/edit.php?post_type=property4.8860.88
Property Locations /wp-admin/edit-tags.php?taxonomy=property-location&post_type=property4.7854.98
Agents /wp-admin/edit.php?post_type=agent4.8154.88
Property Types /wp-admin/edit-tags.php?taxonomy=property-type&post_type=property4.7854.88
Settings /wp-admin/admin.php?page=cre-settings4.7654.24

Server storage [IO: ▲4.26MB] [DB: ▲0.08MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 395 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
cre_property_basic_builder_migrate
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Crucial Real Estate: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,111 ▲36415.03 ▲0.689.31 ▲7.4038.09 ▼6.34
Dashboard /wp-admin2,405 ▲2286.23 ▲0.57129.04 ▲34.6341.65 ▼2.94
Posts /wp-admin/edit.php2,333 ▲2333.39 ▲1.2656.96 ▲19.0732.13 ▼0.80
Add New Post /wp-admin/post-new.php1,604 ▲7825.16 ▲1.88647.39 ▼83.8646.30 ▼15.00
Media Library /wp-admin/upload.php1,470 ▲674.19 ▼0.0394.40 ▼3.3242.65 ▼2.52
New Property /wp-admin/post-new.php?post_type=property7,22923.731,219.72167.37
Property Features /wp-admin/edit-tags.php?taxonomy=property-feature&post_type=property1,5363.2263.4532.13
Property Statuses /wp-admin/edit-tags.php?taxonomy=property-status&post_type=property1,5383.1853.3830.93
All Properties /wp-admin/edit.php?post_type=property1,4233.3452.8130.71
Property Locations /wp-admin/edit-tags.php?taxonomy=property-location&post_type=property1,5783.1651.4532.91
Agents /wp-admin/edit.php?post_type=agent1,3293.3351.9428.91
Property Types /wp-admin/edit-tags.php?taxonomy=property-type&post_type=property1,5383.1951.2032.47
Settings /wp-admin/admin.php?page=cre-settings1,1413.1348.1631.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • cre_property_basic_builder_migrate
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 15× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/crucial-real-estate/templates/archive-property.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/crucial-real-estate/templates/property/sections/address.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/crucial-real-estate/templates/property/sections/floor-plan.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/crucial-real-estate/templates/property/sections/main-detail.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/crucial-real-estate/templates/property/sections/agent.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/crucial-real-estate/templates/property/sections/other-detail.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_terms() in wp-content/plugins/crucial-real-estate/templates/property/sections/features.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_theme_mod() in wp-content/plugins/crucial-real-estate/templates/property/content.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/crucial-real-estate/templates/single-agent.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/crucial-real-estate/templates/property/sections/gallery.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
The official readme.txt is a good inspiration

crucial-real-estate/crucial-real-estate.php 92% from 13 tests

Analyzing the main PHP file in "Crucial Real Estate" version 1.0.5
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 218 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin32,149 lines of code in 361 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1632,2561,67810,215
PHP1482,0754,20710,106
CSS461,7041547,341
SVG30124,482
JSON1005

PHP code Passed 2 tests

This is a very shot 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.37
Average class complexity8.75
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity2.48
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces8
Interfaces1
Traits0
Classes107
▷ Abstract classes65.61%
▷ Concrete classes10194.39%
▷ Final classes10.99%
Methods567
▷ Static methods34661.02%
▷ Public methods50789.42%
▷ Protected methods366.35%
▷ Private methods244.23%
Functions67
▷ Named functions5886.57%
▷ Anonymous functions913.43%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/libraries/meta-box/img/jqueryui/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
assets/images/map-marker.png22.54KB6.77KB▼ 69.97%
includes/libraries/meta-box/img/jqueryui/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
includes/libraries/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
includes/libraries/meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%