65% wp-smart-property

Code Review | Powerful and Simple Property Responsive Listing plugin

WordPress plugin Powerful and Simple Property Responsive Listing plugin scored65%from 54 tests.

About plugin

  • Plugin page: wp-smart-property
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 30, 2014
  • Latest release: Jan 23, 2018
  • Number of updates: 46
  • Update frequency: every 31.6 days
  • Top authors: rajanit2000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,907 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.01ms] Passed 4 tests

Server-side resources used by Powerful and Simple Property Responsive Listing plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1637.08 ▼2.54
Dashboard /wp-admin3.48 ▲0.1848.05 ▼4.06
Posts /wp-admin/edit.php3.60 ▲0.2453.38 ▲4.72
Add New Post /wp-admin/post-new.php6.09 ▲0.2083.09 ▼5.94
Media Library /wp-admin/upload.php3.38 ▲0.1536.88 ▲4.50
Help /wp-admin/edit.php?post_type=post_grid&page=post_grid_menu_help3.4435.58
Settings /wp-admin/edit.php?post_type=post_grid&page=post_grid_menu_settings3.4242.41
New Property Grid /wp-admin/post-new.php?post_type=post_grid3.5242.38
Property Grid /wp-admin/edit.php?post_type=post_grid3.4537.73
City /wp-admin/edit-tags.php?taxonomy=City&post_type=property3.4038.89
Layout Editor /wp-admin/edit.php?post_type=post_grid&page=post_grid_layout_editor3.4834.88

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 125 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics 75% from 4 tests

Powerful and Simple Property Responsive Listing plugin: an overview of browser usage
A great user experience is important, so you should focus on the following
  • Script duration: Total JavaScript execution time should be lower than 1,500.00ms (currently 1,790.08ms on /wp-admin/edit.php?post_type=post_grid&page=post_grid_menu_help)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,188 ▲44216.48 ▲2.117.66 ▲5.8935.75 ▼8.54
Dashboard /wp-admin2,472 ▲2877.23 ▲1.34129.19 ▲12.1279.19 ▲35.38
Posts /wp-admin/edit.php2,393 ▲3013.66 ▲1.6250.75 ▲15.3582.07 ▲49.81
Add New Post /wp-admin/post-new.php6,557 ▲5,03526.20 ▲2.93913.78 ▲231.6653.62 ▼0.63
Media Library /wp-admin/upload.php1,529 ▲1474.98 ▲0.7683.69 ▼20.0997.51 ▲52.52
Help /wp-admin/edit.php?post_type=post_grid&page=post_grid_menu_help6,14571.431,790.0891.00
Settings /wp-admin/edit.php?post_type=post_grid&page=post_grid_menu_settings1,1363.7955.1996.21
New Property Grid /wp-admin/post-new.php?post_type=post_grid3,5955.2597.63114.33
Property Category /wp-admin/edit-tags.php?taxonomy=Property Category&post_type=property1,5633.4545.0063.98
Property Grid /wp-admin/edit.php?post_type=post_grid1,3653.6446.8788.96
City /wp-admin/edit-tags.php?taxonomy=City&post_type=property1,5633.5745.3292.46
Bed Room /wp-admin/edit-tags.php?taxonomy=Bed Room&post_type=property1,5693.4445.0887.32
Property Type /wp-admin/edit-tags.php?taxonomy=Property Type&post_type=property1,5633.4842.3464.68
Layout Editor /wp-admin/edit.php?post_type=post_grid&page=post_grid_layout_editor1,2543.7545.0367.03
Bath Room /wp-admin/edit-tags.php?taxonomy=Bath Room&post_type=property1,5663.5342.4681.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=post_grid&page=post_grid_menu_settings
    • > Warning in wp-content/plugins/wp-smart-property/post-grid/includes/menu/settings.php+102
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/post-new.php?post_type=post_grid
    • > Notice in wp-content/plugins/wp-smart-property/post-grid/includes/meta.php+1688
    Undefined variable: slider_navs_positon
    • > GET request to /wp-admin/post-new.php?post_type=post_grid
    • > Notice in wp-content/plugins/wp-smart-property/post-grid/includes/meta.php+1688
    Undefined variable: slider_navs
    • > GET request to /wp-admin/post-new.php?post_type=post_grid
    • > Notice in wp-content/plugins/wp-smart-property/post-grid/includes/meta.php+1717
    Undefined variable: slider_dots_style
    • > GET request to /wp-admin/post-new.php?post_type=post_grid
    • > Notice in wp-content/plugins/wp-smart-property/post-grid/includes/meta.php+1717
    Undefined variable: slider_dots

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-smart-property/post-grid/includes/dummy-grid-items.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/wp-smart-property/core/install.php): failed to open stream: No such file or directory in wp-content/plugins/wp-smart-property/init.php on line 23
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-smart-property/init.php on line 20
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-smart-property/init.php on line 19
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_PLUGIN_DIR/wp-smart-property/core/install.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-smart-property/init.php on line 23
    • > PHP Warning
      Use of undefined constant post_grid_plugin_url - assumed 'post_grid_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-smart-property/post-grid/includes/dummy-grid-items.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-property/core/install.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-property/core/metabox.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPSMPR_Register_Post' not found in wp-content/plugins/wp-smart-property/core/extras.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=post_grid&page=post_grid_menu_help
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png)
  • Requires at least: Invalid version format
You can look at the official readme.txt

wp-smart-property/init.php 85% from 13 tests

The main PHP script in "Powerful and Simple Property Responsive Listing plugin" version 2.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-smart-property.php" instead of "init.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 205 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin29,300 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript152,9562,74016,186
CSS128071475,075
PHP293,2535303,910
SVG2003,311
PO File2357363818

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods617.65%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
38 PNG files occupy 0.77MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
post-grid/assets/frontend/css/images/link.png3.54KB0.69KB▼ 80.62%
post-grid/assets/admin/bg/small_steps.png0.16KB0.16KB0.00%
post-grid/assets/frontend/css/icons/twitter.png6.02KB2.10KB▼ 65.18%
lib/jquery/ui/images/ui-bg_flat_0_aaaaaa_40x100.png0.21KB0.08KB▼ 58.96%
post-grid/assets/admin/bg/eight_horns.png2.43KB2.79KB0.00%