10% realty-portal-submit-property

Code Review | Realty Portal - Submit Property

WordPress plugin Realty Portal - Submit Property scored10%from 54 tests.

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,704 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/realty-portal-submit-property/realty-portal-submit-property.php+117
    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: ▼7.02ms] Passed 4 tests

An overview of server-side resources used by Realty Portal - Submit Property
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.49 ▼9.64
Dashboard /wp-admin3.31 ▲0.0047.48 ▼3.14
Posts /wp-admin/edit.php3.36 ▲0.0047.26 ▼5.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.00 ▼10.23
Media Library /wp-admin/upload.php3.23 ▲0.0035.35 ▼0.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Realty Portal - Submit Property: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.002.34 ▲0.6149.14 ▲5.10
Dashboard /wp-admin2,198 ▲215.62 ▼0.0584.60 ▼10.4342.45 ▲1.76
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0337.31 ▼5.8034.97 ▼3.49
Add New Post /wp-admin/post-new.php1,526 ▼1222.96 ▲4.69655.17 ▲34.0851.26 ▼10.62
Media Library /wp-admin/upload.php1,397 ▼34.13 ▲0.0299.84 ▼12.2345.51 ▲2.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Shortcodes' not found in wp-content/plugins/realty-portal-submit-property/includes/class-submit-property-shortcode.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: real-estate, property listings, property, property management, agent

realty-portal-submit-property/realty-portal-submit-property.php Passed 13 tests

"Realty Portal - Submit Property" version 0.3.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
82 characters long description:
The add-on helps to submit properties right in front-end. It works with any theme!

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
Good job! No executable or dangerous file extensions detected831 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5150187570
LESS2262194
JavaScript1121166
CSS1011

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods1777.27%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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