10% immocaster

Code Review | Immocaster Wordpress Plugin

WordPress plugin Immocaster Wordpress Plugin scored10%from 54 tests.

About plugin

  • Plugin page: immocaster
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-3.9.0
  • WordPress version: 6.3.1
  • First release: Nov 14, 2013
  • Latest release: Sep 30, 2015
  • Number of updates: 76
  • Update frequency: every 9.0 days
  • Top authors: Medienopfer98 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /5,014 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Error in wp-content/plugins/immocaster/lib/Immocaster/Data/Mysql.php+105
    Uncaught Error: Call to undefined function mysql_connect() in wp-content/plugins/immocaster/lib/Immocaster/Data/Mysql.php:105
    Stack trace:
    #0 wp-content/plugins/immocaster/lib/Immocaster/Data/Mysql.php(80): Immocaster_Data_Mysql->connectDatabase()
    #1 wp-content/plugins/immocaster/lib/Immocaster/Data/Mysql.php(61): Immocaster_Data_Mysql->__construct()
    #2 wp-content/plugins/immocaster/lib/Immocaster/Sdk.php(145): Immocaster_Data_Mysql::getInstance()
    #3 wp-content/plugins/immocaster/lib/immocaster.php(27): Immocaster_Sdk->setDataStorage()
    #4 wp-content/plugins/immocaster/lib/immocaster.php(17): ImmocasterSDK->__construct()
    #5 wp-content/plugins/immocaster/immocaster.php(160): ImmocasterSDK::getInstance()
    #6 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #7 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()
    #8 /va

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.61ms] Passed 4 tests

Analyzing server-side resources used by Immocaster Wordpress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.25 ▲3.48
Dashboard /wp-admin3.31 ▲0.0047.77 ▼3.91
Posts /wp-admin/edit.php3.36 ▲0.0048.52 ▼11.79
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.33 ▼18.22
Media Library /wp-admin/upload.php3.23 ▲0.0038.38 ▲5.01

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 97 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Immocaster Wordpress Plugin: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.67 ▲0.351.66 ▼0.1743.47 ▼1.46
Dashboard /wp-admin2,195 ▲155.55 ▼0.0987.77 ▼5.0039.14 ▼4.00
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0338.92 ▼1.7535.37 ▼2.20
Add New Post /wp-admin/post-new.php1,526 ▼322.94 ▼0.33682.47 ▲12.4254.07 ▼16.32
Media Library /wp-admin/upload.php1,397 ▼64.20 ▲0.0395.26 ▼23.1948.18 ▼0.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/immocaster/lib/Immocaster/Oauth/example/request_token.php
    • > /wp-content/plugins/immocaster/lib/Immocaster/Oauth/example/client.php
    • > /wp-content/plugins/immocaster/lib/Immocaster/Oauth/example/access_token.php
    • > /wp-content/plugins/immocaster/lib/Immocaster/Oauth/example/echo_api.php
    • > /wp-content/plugins/immocaster/lib/Immocaster/Oauth/example/index.php
  • 33× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Declaration of MockOAuthDataStore::new_access_token($token, $consumer) should be compatible with OAuthDataStore::new_access_token($token, $consumer, $verifier = NULL) in wp-content/plugins/immocaster/lib/Immocaster/Oauth/OAuth_TestServer.php on line 98
    • > PHP Fatal error
      Uncaught Error: Class 'OAuthServer' not found in wp-content/plugins/immocaster/lib/Immocaster/Oauth/OAuth_TestServer.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'OAuthDataStore' not found in wp-content/plugins/immocaster/lib/Immocaster/Oauth/tests/Mock_OAuthDataStore.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/immocaster/language.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/immocaster/lib/Immocaster/Oauth/tests/OAuthConsumerTest.php:5
    • > PHP Warning
      Declaration of MockOAuthDataStore::new_access_token($token, $consumer) should be compatible with OAuthDataStore::new_access_token($token, $consumer, $verifier = NULL) in wp-content/plugins/immocaster/lib/Immocaster/Oauth/OAuth_TestServer.php on line 98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/immocaster/lib/widget_teaser.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/immocaster/immocaster.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/immocaster/lib/Immocaster/Oauth/tests/OAuthSignatureMethodHmacSha1Test.php:6
    • > PHP Warning
      Declaration of MockOAuthDataStore::new_request_token($consumer) should be compatible with OAuthDataStore::new_request_token($consumer, $callback = NULL) in wp-content/plugins/immocaster/lib/Immocaster/Oauth/OAuth_TestServer.php on line 91

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 ([Installation: Hinterlegen Sie Key und Secret.](http://medienopfer98.de/immocaster/screen1.jpg)), #2 ([Ergebnislisten erstellen Sie innerhalb von Seiten.](http://medienopfer98.de/immocaster/screen2.jpg)), #3 ([Teaser mit Immobilien können im Bereich Widgets angelegt werden.](http://medienopfer98.de/immocaster/screen3.jpg))
  • Tags: You are using too many tags: 38 tag instead of maximum 10
Please take inspiration from this readme.txt

immocaster/immocaster.php 92% from 13 tests

"Immocaster Wordpress Plugin" version 1.3.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 368 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected10,007 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
PHP536791,2885,386
JavaScript121,4621,0673,668
CSS34224413
PO File1132346285
HTML45315242
XML10013
INI1070

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.51
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes37
▷ Abstract classes25.41%
▷ Concrete classes3594.59%
▷ Final classes00.00%
Methods235
▷ Static methods229.36%
▷ Public methods17875.74%
▷ Protected methods93.83%
▷ Private methods4820.43%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants56
▷ Global constants56100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/house_118x118.png1.59KB0.50KB▼ 68.37%
images/immocaster_icon_med.png2.78KB1.79KB▼ 35.48%
images/house_240x140.png1.01KB0.55KB▼ 45.11%
images/immocaster_menu_icon.png1.56KB0.88KB▼ 43.51%
lib/galleria/themes/classic/classic-map.png1.80KB0.67KB▼ 62.77%