88% virtual-real-estate-agent

Code Review | Virtual Real Estate Agent

WordPress plugin Virtual Real Estate Agent scored 88% from 54 tests.

About plugin

  • Plugin page: virtual-real-esta...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.3
  • WordPress version: 5.8.1
  • First release: Aug 13, 2020
  • Latest release: May 26, 2021
  • Number of updates: 19
  • Update frequency: every 15.0 days
  • Top authors: adeelb4u (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 197 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼140.29ms] Passed 4 tests

Analyzing server-side resources used by Virtual Real Estate Agent
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2036.28 ▲12.95
Dashboard /wp-admin3.15 ▲0.0945.90 ▼1.38
Posts /wp-admin/edit.php3.26 ▲0.1543.31 ▼1.40
Add New Post /wp-admin/post-new.php5.51 ▲0.0788.70 ▼562.03
Media Library /wp-admin/upload.php3.09 ▲0.0935.13 ▲3.66
Settings /wp-admin/admin.php?page=va-chatplugin-menu-settings3.0630.16
Overview /wp-admin/admin.php?page=va-chatplugin-menu3.0832.03

Server storage [IO: ▲5.28MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 45 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Virtual Real Estate Agent
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,714 ▲11816.03 ▲0.597.38 ▼2.7247.43 ▲0.55
Dashboard /wp-admin3,006 ▲766.06 ▲0.08141.92 ▼9.60113.51 ▼4.53
Posts /wp-admin/edit.php2,772 ▲332.71 ▲0.0273.39 ▲4.4397.87 ▲4.34
Add New Post /wp-admin/post-new.php1,521 ▼16218.90 ▲0.35371.56 ▼0.46109.36 ▼2.15
Media Library /wp-admin/upload.php1,840 ▲335.00 ▼0.03147.47 ▼4.05126.68 ▲12.41
Settings /wp-admin/admin.php?page=va-chatplugin-menu-settings1,1542.3356.1188.79
Overview /wp-admin/admin.php?page=va-chatplugin-menu1,2742.3059.14103.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

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
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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/virtual-real-estate-agent/public/partials/settings-page-public-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/virtual-real-estate-agent/admin/partials/virtual-real-estate-agent-admin-overview.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/virtual-real-estate-agent/admin/partials/virtual-real-estate-agent-admin-settings.php:18

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 97% 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
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (The screenshots of the settings can be found inside the `/virtual-real-estate-agent/assets` directory.)
The official readme.txt is a good inspiration

virtual-real-estate-agent/virtual-real-estate-agent.php Passed 13 tests

The entry point to "Virtual Real Estate Agent" version 1.1.6 is a PHP file that has certain tags in its header comment area
131 characters long description:
This is the initial wordpress plugin to serve chat plugin inside the iFrame and display this chat plugin on the wordpress websites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected894 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP14159570451
CSS2118319
PO File126367
Markdown218034
JavaScript275422
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.86
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 5.15MB with 3.97MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/de/5.png337.09KB76.14KB▼ 77.41%
assets/images/en/1.png368.17KB87.76KB▼ 76.16%
assets/images/en/6.png340.17KB77.13KB▼ 77.33%
assets/images/en/2.png374.25KB88.08KB▼ 76.46%
assets/images/en/8.png343.43KB75.95KB▼ 77.88%