78% wp-immo

Code Review | WP Immo

WordPress plugin WP Immo scored78%from 54 tests.

About plugin

  • Plugin page: wp-immo
  • Plugin version: 1.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: Feb 6, 2016
  • Latest release: Jan 26, 2022
  • Number of updates: 8
  • Update frequency: every 272.9 days
  • Top authors: cvmh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,387 total downloads

Benchmarks

Plugin footprint 82% 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: ▲0.36MB] [CPU: ▼5.15ms] Passed 4 tests

An overview of server-side resources used by WP Immo
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0727.57 ▼18.40
Dashboard /wp-admin3.86 ▲0.5253.81 ▼9.19
Posts /wp-admin/edit.php3.91 ▲0.5657.04 ▲3.96
Add New Post /wp-admin/post-new.php6.40 ▲0.5299.29 ▲3.02
Media Library /wp-admin/upload.php3.72 ▲0.4943.80 ▲5.17
WP Immo /wp-admin/options-general.php?page=wp-immo3.7336.76

Server storage [IO: ▲0.52MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please fix the following
  • Illegal file modification found: 3 files (8.04KB) outside of "wp-content/plugins/wp-immo/" and "wp-content/uploads/"
    • (new file) wp-content/themes/twentytwentyone/templates/wpimmo-taxonomy.php
    • (new file) wp-content/themes/twentytwentyone/templates/wpimmo-list.php
    • (new file) wp-content/themes/twentytwentyone/templates/wpimmo-property.php
Filesystem: 76 new files
Database: no new tables, 10 new options
New WordPress options
widget_widget_wpimmo_group
widget_theysaidso_widget
widget_widget_wpimmo_last_properties
wpimmo
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_widget_wpimmo_search
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Immo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10113.39 ▼0.882.14 ▲0.1943.09 ▼6.87
Dashboard /wp-admin2,239 ▲485.03 ▲0.16106.62 ▼4.1840.51 ▼0.07
Posts /wp-admin/edit.php2,126 ▲372.28 ▲0.2441.31 ▼0.7536.82 ▲1.05
Add New Post /wp-admin/post-new.php1,541 ▲2117.87 ▼5.12641.18 ▲18.1667.44 ▲17.63
Media Library /wp-admin/upload.php1,418 ▲304.34 ▲0.15100.69 ▼1.7542.25 ▼4.63
WP Immo /wp-admin/options-general.php?page=wp-immo1,6602.0640.3329.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • db_upgraded
    • widget_widget_wpimmo_last_properties
    • widget_widget_wpimmo_group
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • wpimmo
    • widget_recent-comments
    • widget_widget_wpimmo_search
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-immo
    • > Notice in wp-content/plugins/wp-immo/templates/admin/settings.php+106
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-immo
    • > Notice in wp-content/plugins/wp-immo/templates/admin/tabs/main.php+85
    Undefined index: external_feed

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPImmo' not found in wp-content/plugins/wp-immo/includes/wpimmo-admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-immo/templates/front/property.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-immo/includes/wpimmo-widgets.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPImmo' not found in wp-content/plugins/wp-immo/includes/wpimmo-data.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WPImmo' not found in wp-content/plugins/wp-immo/default-data.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-immo/languages/infos.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WPImmo' not found in wp-content/plugins/wp-immo/includes/wpimmo-process.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-immo/templates/front/taxonomy.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPImmo' not found in wp-content/plugins/wp-immo/includes/wpimmo-cron.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WPImmo' not found in wp-content/plugins/wp-immo/includes/wpimmo-tools.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: real estate software

wp-immo/wp-immo.php Passed 13 tests

The principal PHP file in "WP Immo" v. 1.1.4 is loaded by WordPress automatically on each request
37 characters long description:
Manage your real estate in WordPress.

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
Success! There were no dangerous files found in this plugin5,282 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP252575783,077
JavaScript8317263909
CSS57270619
PO File1255611543
SVG200134

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity31.82
▷ Minimum class complexity1.00
▷ Maximum class complexity93.00
Average method complexity5.58
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods75
▷ Static methods5978.67%
▷ Public methods75100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/jquery-ui/redmond/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png3.38KB1.68KB▼ 50.10%
images/bkg_ges.png9.28KB3.53KB▼ 62.01%
images/no-photo.png6.45KB2.18KB▼ 66.18%
js/jquery-ui/redmond/images/ui-bg_flat_55_fbec88_40x100.png0.21KB0.08KB▼ 59.15%
js/jquery-ui/redmond/images/ui-bg_glass_75_d0e5f5_1x400.png0.12KB0.16KB0.00%