10% realty-portal-agent

Code Review | Realty Portal - Agent

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

About plugin

  • Plugin page: realty-portal-agent
  • 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

100+ active /2,621 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/realty-portal-agent/realty-portal-agent.php+179
    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: ▼9.40ms] Passed 4 tests

An overview of server-side resources used by Realty Portal - Agent
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.96 ▼0.17
Dashboard /wp-admin3.31 ▲0.0047.38 ▼1.27
Posts /wp-admin/edit.php3.36 ▲0.0045.84 ▼4.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.93 ▼27.00
Media Library /wp-admin/upload.php3.23 ▲0.0032.17 ▼4.41

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Realty Portal - Agent
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.70 ▼0.691.61 ▼0.4540.20 ▼0.16
Dashboard /wp-admin2,206 ▲185.83 ▼0.2295.02 ▼10.3340.88 ▼1.02
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0532.20 ▼7.1332.41 ▼2.31
Add New Post /wp-admin/post-new.php1,514 ▼517.50 ▼5.60657.96 ▼8.4052.64 ▼4.45
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0399.09 ▼14.4042.56 ▼4.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/realty-portal-agent/templates/loop/agent-loop-end.php
    • > /wp-content/plugins/realty-portal-agent/templates/loop/agent-loop-start.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Shortcodes' not found in wp-content/plugins/realty-portal-agent/includes/class-agent-shortcode.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/realty-portal-agent/realty-portal-agent-functions.php:359
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rp_add_custom_field_type() in wp-content/plugins/realty-portal-agent/fields/agent_social/agent_social.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function rp_add_custom_field_type() in wp-content/plugins/realty-portal-agent/fields/agent_custom_field/agent_custom_field.php:75
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Shortcodes' not found in wp-content/plugins/realty-portal-agent/includes/class-member-shortcode.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Property Listings), #2 (Property Detail), #3 (Agent Listings), #4 (Agent Detail), #5 (Property Map)
Please take inspiration from this readme.txt

realty-portal-agent/realty-portal-agent.php 92% from 13 tests

The main PHP script in "Realty Portal - Agent" version 0.3.9 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected5,953 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP318338383,149
CSS31101,947
JavaScript410666459
LESS2272398

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity23.73
▷ Minimum class complexity1.00
▷ Maximum class complexity87.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods96
▷ Static methods6870.83%
▷ Public methods9497.92%
▷ Protected methods00.00%
▷ Private methods22.08%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin