84% propertyshift

Code Review | PropertyShift

WordPress plugin PropertyShift scored84%from 54 tests.

About plugin

  • Plugin page: propertyshift
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Jan 11, 2020
  • Latest release: Jan 15, 2020
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: cagipple (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /515 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.48MB] [CPU: ▲137.03ms] Passed 4 tests

An overview of server-side resources used by PropertyShift
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.49360.57 ▲303.63
Dashboard /wp-admin3.80 ▲0.45191.91 ▲125.03
Posts /wp-admin/edit.php3.85 ▲0.49182.05 ▲128.79
Add New Post /wp-admin/post-new.php6.38 ▲0.49257.53 ▲152.88
Media Library /wp-admin/upload.php3.73 ▲0.49181.50 ▲141.42
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.87189.11

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by PropertyShift
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲7014.23 ▼0.351.98 ▲0.2544.42 ▼0.07
Dashboard /wp-admin2,219 ▲415.57 ▼0.0582.82 ▼31.9543.10 ▲1.81
Posts /wp-admin/edit.php2,136 ▲332.03 ▲0.0841.38 ▲3.6238.83 ▲4.82
Add New Post /wp-admin/post-new.php1,548 ▲2221.11 ▼1.04622.14 ▼84.2265.07 ▲12.82
Media Library /wp-admin/upload.php1,435 ▲354.17 ▼0.13114.08 ▲0.2752.87 ▲2.42
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins9792.0625.0130.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 21× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PropertyShift_Admin' not found in wp-content/plugins/propertyshift/includes/templates/property-filter-minimal.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PropertyShift_Admin' not found in wp-content/plugins/propertyshift/includes/templates/property-filter.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/propertyshift/includes/templates/agent_contact_form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/propertyshift/includes/classes/widgets/property_filter_widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/propertyshift/includes/templates/loop_property_grid.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/propertyshift/includes/templates/loop_properties.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_id() in wp-content/plugins/propertyshift/includes/templates/loop_property_single.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/propertyshift/includes/classes/widgets/list_property_categories_widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PropertyShift_Admin' not found in wp-content/plugins/propertyshift/includes/templates/loop_agent_single.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/propertyshift/includes/templates/templates.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

propertyshift/propertyshift.php Passed 13 tests

The primary PHP file in "PropertyShift" version 1.0.0 is used by WordPress to initiate all plugin functionality
70 characters long description:
Robust real estate listing system for agents and agencies of any size.

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
Good job! No executable or dangerous file extensions detected8,029 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP271,3052,3467,220
JavaScript412795442
CSS36250331
SVG10131
Markdown1305

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity36.37
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods234
▷ Static methods104.27%
▷ Public methods21190.17%
▷ Protected methods239.83%
▷ Private methods00.00%
Functions19
▷ Named functions1789.47%
▷ Anonymous functions210.53%
Constants9
▷ Global constants666.67%
▷ Class constants333.33%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png3.25KB0.59KB▼ 81.80%