78% getrets

Code Review | GetRETS

WordPress plugin GetRETS scored78%from 54 tests.

About plugin

  • Plugin page: getrets
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-4.7
  • WordPress version: 6.3.1
  • First release: Dec 8, 2016
  • Latest release: Mar 12, 2017
  • Number of updates: 19
  • Update frequency: every 4.7 days
  • Top authors: joshtimitek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /884 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼7.27ms] Passed 4 tests

Analyzing server-side resources used by GetRETS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2847.49 ▲8.27
Dashboard /wp-admin3.54 ▲0.1948.21 ▼15.17
Posts /wp-admin/edit.php3.59 ▲0.2354.55 ▼1.14
Add New Post /wp-admin/post-new.php6.06 ▲0.1781.86 ▼15.98
Media Library /wp-admin/upload.php3.40 ▲0.1739.64 ▲3.23
GetRETS /wp-admin/options-general.php?page=getrets-admin-settings3.3733.32

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 43 new files
Database: no new tables, 9 new options
New WordPress options
widget_getretssearchwidget
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
GetRETS_options
theysaidso_admin_options
GetRETS_version
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for GetRETS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13013.74 ▼0.909.25 ▲7.6541.18 ▲1.65
Dashboard /wp-admin2,199 ▲225.57 ▼0.0479.94 ▼11.8437.64 ▼5.64
Posts /wp-admin/edit.php2,104 ▲72.01 ▲0.0638.46 ▲2.9635.75 ▼0.46
Add New Post /wp-admin/post-new.php1,541 ▲1522.76 ▼0.43660.00 ▼14.5460.72 ▼6.53
Media Library /wp-admin/upload.php1,404 ▲44.17 ▲0.0696.71 ▼10.2544.55 ▼6.01
GetRETS /wp-admin/options-general.php?page=getrets-admin-settings9292.0225.3538.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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • GetRETS_options
    • widget_getretssearchwidget
    • GetRETS_version
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/getrets/views/frontend/content.php
    • > /wp-content/plugins/getrets/views/admin/instructions.php
    • > /wp-content/plugins/getrets/getrets.php
  • 34× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: listing in wp-content/plugins/getrets/views/frontend/content.php on line 41
    • > PHP Notice
      Undefined variable: listing in wp-content/plugins/getrets/views/frontend/content.php on line 92
    • > PHP Notice
      Trying to get property 'photoCount' of non-object in wp-content/plugins/getrets/views/frontend/content.php on line 92
    • > PHP Notice
      Trying to get property 'baths' of non-object in wp-content/plugins/getrets/views/frontend/content.php on line 36
    • > PHP Notice
      Trying to get property 'features' of non-object in wp-content/plugins/getrets/views/frontend/content.php on line 58
    • > PHP Notice
      Undefined variable: listing in wp-content/plugins/getrets/views/frontend/content.php on line 46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/getrets/views/frontend/search.php:1
    • > PHP Notice
      Undefined variable: description in wp-content/plugins/getrets/views/frontend/content.php on line 56
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/getrets/views/admin/searchWidget.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/getrets/views/admin/settings.php:11

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === getrets === )
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

getrets/getrets.php Passed 13 tests

The main PHP file in "GetRETS" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
140 characters long description:
Instantly add real estate listing data to your website. Allows listings, from multiple feeds, to appear within your site as native content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,998 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP172231701,087
Markdown32950475
HTML11050207
LESS2231097
CSS201189
JavaScript111043

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.38
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes17.69%
Methods87
▷ Static methods1213.79%
▷ Public methods7080.46%
▷ Protected methods22.30%
▷ Private methods1517.24%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.50MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png8.35KB4.13KB▼ 50.49%
assets/screenshot-5.png88.16KB36.59KB▼ 58.49%
assets/screenshot-1.png104.34KB40.31KB▼ 61.36%
assets/banner-1544x500.png131.09KB53.68KB▼ 59.05%
assets/screenshot-4.png93.34KB34.93KB▼ 62.57%