10% realty-portal-compare

Code Review | Realty Portal - Compare

WordPress plugin Realty Portal - Compare scored10%from 54 tests.

About plugin

  • Plugin page: realty-portal-com...
  • Plugin version: 0.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.8.2
  • WordPress version: 6.3.1
  • First release: May 24, 2017
  • Latest release: Mar 22, 2019
  • Number of updates: 14
  • Update frequency: every 48.1 days
  • Top authors: nootheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /2,411 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/realty-portal-compare/realty-portal-compare.php+120
    Use of undefined constant REALTY_PORTAL - assumed 'REALTY_PORTAL' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.01MB] [CPU: ▼4.70ms] Passed 4 tests

This is a short check of server-side resources used by Realty Portal - Compare
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.93 ▼0.83
Dashboard /wp-admin3.31 ▼0.0454.93 ▼6.03
Posts /wp-admin/edit.php3.36 ▲0.0047.78 ▼7.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.19 ▼4.78
Media Library /wp-admin/upload.php3.23 ▲0.0037.48 ▲3.46

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

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

Browser metrics Passed 4 tests

Realty Portal - Compare: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.67 ▲0.551.87 ▼0.1042.16 ▼1.36
Dashboard /wp-admin2,198 ▲185.63 ▼0.0290.15 ▼1.9441.68 ▲2.81
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0337.05 ▼2.3436.71 ▲0.87
Add New Post /wp-admin/post-new.php1,526 ▼222.99 ▼0.21672.03 ▼43.5959.25 ▲2.99
Media Library /wp-admin/upload.php1,403 ▲64.21 ▼0.0395.23 ▼10.1344.69 ▼3.91

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Shortcodes' not found in wp-content/plugins/realty-portal-compare/includes/class-compare-shortcode.php:12

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Property Listings), #2 (Property Detail), #3 (Agent Listings), #4 (Agent Detail), #5 (Property Map)
The official readme.txt might help

realty-portal-compare/realty-portal-compare.php Passed 13 tests

"Realty Portal - Compare" version 0.3.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
80 characters long description:
An add-on that provides properties comparison to your site. Work with any theme.

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
Good job! No executable or dangerous file extensions detected941 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4103143416
LESS2322260
CSS111185
JavaScript124080

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.67
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods2184.00%
▷ Public methods2392.00%
▷ Protected methods00.00%
▷ Private methods28.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin