10% realty-portal-my-favorites

Code Review | Realty Portal - My Favorites

WordPress plugin Realty Portal - My Favorites scored10%from 54 tests.

About plugin

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

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,525 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
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/realty-portal-my-favorites/realty-portal-my-favorites.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.00MB] [CPU: ▼3.87ms] Passed 4 tests

Analyzing server-side resources used by Realty Portal - My Favorites
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.73 ▲1.01
Dashboard /wp-admin3.31 ▲0.0048.13 ▼0.57
Posts /wp-admin/edit.php3.36 ▲0.0048.90 ▼4.15
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.13 ▼11.78
Media Library /wp-admin/upload.php3.23 ▲0.0039.80 ▲4.90

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Realty Portal - My Favorites
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.35 ▼0.031.72 ▼0.3539.01 ▼9.96
Dashboard /wp-admin2,195 ▲215.64 ▲0.0089.81 ▼14.4740.30 ▼4.59
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0239.60 ▼1.7538.20 ▲2.56
Add New Post /wp-admin/post-new.php1,536 ▲822.87 ▼0.29653.41 ▼16.5564.42 ▲11.37
Media Library /wp-admin/upload.php1,403 ▲34.23 ▼0.14114.29 ▲7.3349.44 ▲1.51

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'RP_Shortcodes' not found in wp-content/plugins/realty-portal-my-favorites/includes/class-my-favorites-shortcode.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • 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-my-favorites/realty-portal-my-favorites.php Passed 13 tests

The main PHP file in "Realty Portal - My Favorites" ver. 0.3.9 adds more information about the plugin and also serves as the entry point for this plugin
80 characters long description:
The add-on allows user to save your properties as favorite. 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
There were no executable files found in this plugin464 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4115193359
JavaScript1229105

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity10.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin