10% propertyengine-real-estate

Code Review | PropertyEngine Widgets Shortcodes

WordPress plugin PropertyEngine Widgets Shortcodes scored10%from 54 tests.

About plugin

  • Plugin page: propertyengine-re...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.5
  • WordPress version: 6.3.1
  • First release: Feb 20, 2013
  • Latest release: Aug 7, 2013
  • Number of updates: 41
  • Update frequency: every 5.0 days
  • Top authors: propertyengine (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,197 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/propertyengine-real-estate/propertyengine-widgets-shortcodes.php+33
    Non-static method PropertyEngineWidgetsShortCodePlugin::bootstrap() should not be called statically

Server metrics [RAM: ▼1.90MB] [CPU: ▼50.57ms] Passed 4 tests

Analyzing server-side resources used by PropertyEngine Widgets Shortcodes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.97 ▼30.53
Dashboard /wp-admin2.11 ▼1.196.17 ▼42.78
Posts /wp-admin/edit.php2.11 ▼1.255.66 ▼39.77
Add New Post /wp-admin/post-new.php2.11 ▼3.786.15 ▼89.18
Media Library /wp-admin/upload.php2.11 ▼1.125.64 ▼27.77
PropertyEngine Widgets Shortcodes /wp-admin/options-general.php?page=propertyengine-options2.115.89

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 90 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
propertyengine_tracking_id
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for PropertyEngine Widgets Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲4614.60 ▲0.231.49 ▼0.1242.70 ▲1.09
Dashboard /wp-admin2,210 ▲325.54 ▼0.1088.34 ▼13.4340.32 ▼3.05
Posts /wp-admin/edit.php2,119 ▲162.04 ▲0.0435.47 ▼7.4439.07 ▲2.61
Add New Post /wp-admin/post-new.php1,543 ▲623.11 ▲5.07695.50 ▲94.1053.21 ▼21.00
Media Library /wp-admin/upload.php1,415 ▲154.28 ▲0.0798.01 ▼15.1141.64 ▼5.36
PropertyEngine Widgets Shortcodes /wp-admin/options-general.php?page=propertyengine-options9702.0827.3534.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/propertyengine-real-estate/propertyengine-widgets-shortcodes.php+33
    Non-static method PropertyEngineWidgetsShortCodePlugin::bootstrap() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-content/plugins/propertyengine-real-estate/propertyengine-widgets-shortcodes.php+33
    Non-static method PropertyEngineWidgetsShortCodePlugin::bootstrap() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-content/plugins/propertyengine-real-estate/lib/PropertyEngineWidgetsShortcodePlugin.class.php+19
    Non-static method PropertyEngineWidgetsShortCodePlugin::getLocation() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PropertyEngineWidgetsShortcodeRteTinyMce::bootstrap() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PropertyEngineWidgetsShortcodesAdmin::setupAdminMenu() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PropertyEngineWidgetsShortcodesAdmin::printJavaScript() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PropertyEngineWidgetsShortcodesAdmin::printStylesheet() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PropertyEngineWidgetsShortcodesAdmin::printNotice() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PropertyEngineWidgetsShortcodesAdmin::displayOptions() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-content/plugins/propertyengine-real-estate/admin/form/options.php+16
    Non-static method PropertyEngineWidgetsShortcodeConfiguration::getOptions() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=propertyengine-options
    • > Deprecated in wp-content/plugins/propertyengine-real-estate/admin/view/options.php+46
    Non-static method PropertyEngineWidgetsShortcodesAdmin::displayDocumentation() should not be called statically

SRP 0% 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 fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/propertyengine-real-estate/uninstall.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PropertyEngineWidgetsShortcodeBase' not found in wp-content/plugins/propertyengine-real-estate/lib/widgets/PropertyEngineWidgetsShortcodeDummy.class.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PropertyEngineWidgetsShortcodeBase' not found in wp-content/plugins/propertyengine-real-estate/lib/widgets/PropertyEngineWidgetsShortcodeLiveList.class.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/propertyengine-real-estate/lib/widgets/PropertyEngineWidgetsShortcodeLiveList.tmpl.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/propertyengine-real-estate/propertyengine-widgets-shortcodes.php on line 19
    • > PHP Notice
      Undefined variable: mce_locale in wp-content/plugins/propertyengine-real-estate/web/javascript/tinymce3/wppropertyengine/langs/langs.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/propertyengine-real-estate/admin/view/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/propertyengine-real-estate/admin/view/documentation.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function js_escape() in wp-content/plugins/propertyengine-real-estate/web/javascript/tinymce3/wppropertyengine/langs/langs.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/propertyengine-real-estate/propertyengine-widgets-shortcodes.php:20
    • > PHP Warning
      Use of undefined constant PLUGINDIR - assumed 'PLUGINDIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/propertyengine-real-estate/propertyengine-widgets-shortcodes.php on line 19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can look at the official readme.txt

propertyengine-real-estate/propertyengine-widgets-shortcodes.php 85% from 13 tests

"PropertyEngine Widgets Shortcodes" version 1.2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 181 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("propertyengine-real-estate.php" instead of "propertyengine-widgets-shortcodes.php")

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
No dangerous file extensions were detected4,862 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript152215553,403
PHP19121415983
SVG100255
CSS61927119
HTML21341102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity4.82
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods39
▷ Static methods00.00%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
24 PNG files occupy 0.27MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
web/img/status-available-large.png79.61KB1.12KB▼ 98.60%
web/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
web/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
web/img/jslider.png1.11KB0.71KB▼ 35.92%
web/img/jslider.round.plastic2.png2.80KB1.81KB▼ 35.41%