10% realty-portal-package

Code Review | Realty Portal - Package

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

About plugin

  • Plugin page: realty-portal-pac...
  • 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: 16
  • Update frequency: every 42.1 days
  • Top authors: nootheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,471 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/realty-portal-package/realty-portal-package.php+132
    Use of undefined constant REALTY_PORTAL - assumed 'REALTY_PORTAL' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.84ms] Passed 4 tests

A check of server-side resources used by Realty Portal - Package
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.49 ▼8.05
Dashboard /wp-admin3.31 ▲0.0044.68 ▼6.04
Posts /wp-admin/edit.php3.36 ▲0.0046.60 ▼1.01
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.40 ▲7.22
Media Library /wp-admin/upload.php3.23 ▲0.0034.08 ▼0.27

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Realty Portal - Package
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.52 ▼1.162.13 ▲0.4841.59 ▼0.26
Dashboard /wp-admin2,209 ▲215.00 ▼0.8597.93 ▼20.2439.41 ▼4.97
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0139.13 ▼0.2434.89 ▼0.49
Add New Post /wp-admin/post-new.php1,547 ▲2818.02 ▼5.18615.97 ▼57.8975.41 ▲20.70
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.01100.16 ▼8.2844.13 ▼3.55

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/realty-portal-package/lib/class-paypal-framework.php:137
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Shortcodes' not found in wp-content/plugins/realty-portal-package/includes/class-package-shortcode.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/realty-portal-package/lib/woocommerce-checkout.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/realty-portal-package/includes/class-payment.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/realty-portal-package/includes/class-membership.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
Please fix the following attributes:
  • 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-package/realty-portal-package.php Passed 13 tests

The entry point to "Realty Portal - Package" version 0.3.9 is a PHP file that has certain tags in its header comment area
61 characters long description:
The add-on manages your Membership type. Work with any theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,179 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP116727252,781
JavaScript25426255
LESS2212142
CSS1011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity47.50
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity4.88
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods96
▷ Static methods5052.08%
▷ Public methods7982.29%
▷ Protected methods00.00%
▷ Private methods1717.71%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
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
assets/images/package.png0.98KB0.61KB▼ 37.91%