10% realtypack-core

Code Review | Realty Pack Core

WordPress plugin Realty Pack Core scored10%from 54 tests.

About plugin

  • Plugin page: realtypack-core
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2019
  • Latest release: Aug 23, 2019
  • Number of updates: 7
  • Update frequency: every 7.7 days
  • Top authors: eightqueens (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /737 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/realtypack-core/controllers/admin/dashboard/plugin.php+78
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.63MB] [CPU: ▲83.45ms] Passed 4 tests

Analyzing server-side resources used by Realty Pack Core
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.48 ▲1.02129.48 ▲86.77
Dashboard /wp-admin4.69 ▲1.38161.30 ▲111.14
Posts /wp-admin/edit.php4.69 ▲1.33187.09 ▲141.32
Add New Post /wp-admin/post-new.php4.69 ▼1.20148.67 ▲46.57
Media Library /wp-admin/upload.php4.69 ▲1.46126.85 ▲89.32
System Status /wp-admin/admin.php?page=realty-pack-core-system-status4.69151.03
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools4.69147.12
Tutorials /wp-admin/admin.php?page=realty-pack-core-tutorials4.69129.65
RealtyPack /wp-admin/admin.php?page=realty-pack-core4.69166.76
Field Groups /wp-admin/edit.php?post_type=acf-field-group4.69142.12
Info /wp-admin/edit.php?post_type=acf-field-group&page=acf-settings-info4.69129.86
All Packages /wp-admin/edit.php?post_type=rtfc_pricing4.69108.00
Add New /wp-admin/post-new.php?post_type=acf-field-group4.69139.89
Demo Importer /wp-admin/admin.php?page=realty-pack-core-importer4.69120.32
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins4.83108.00

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 816 new files
Database: no new tables, 10 new options
New WordPress options
elementor_cpt_support
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
acf_version
widget_rtpc\controllers\admin\widgets\rtpc_controllers_admin_widgets_posts
widget_theysaidso_widget
can_compress_scripts
widget_rtpc\controllers\admin\widgets\rtpc_controllers_admin_widgets_social

Browser metrics Passed 4 tests

Checking browser requirements for Realty Pack Core
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,028 ▲28214.34 ▼0.318.38 ▲6.4835.61 ▼8.87
Dashboard /wp-admin2,306 ▲1185.17 ▲0.27113.90 ▼7.9780.90 ▲33.14
Posts /wp-admin/edit.php2,207 ▲1182.26 ▲0.2133.43 ▼2.5433.26 ▼4.33
Add New Post /wp-admin/post-new.php6,742 ▲5,22828.23 ▲10.581,077.65 ▲395.1743.50 ▼16.68
Media Library /wp-admin/upload.php2,030 ▲6428.51 ▲4.18217.66 ▲100.4489.89 ▲41.71
System Status /wp-admin/admin.php?page=realty-pack-core-system-status1,3021.8626.7642.40
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools1,1363.3051.2032.55
Tutorials /wp-admin/admin.php?page=realty-pack-core-tutorials1,1301.8426.8432.32
RealtyPack /wp-admin/admin.php?page=realty-pack-core1,2801.8526.7737.57
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,2762.9349.2638.25
Info /wp-admin/edit.php?post_type=acf-field-group&page=acf-settings-info1,1361.8425.6168.53
All Packages /wp-admin/edit.php?post_type=rtfc_pricing1,1802.2533.6732.80
Add New /wp-admin/post-new.php?post_type=acf-field-group2,3073.7877.2392.53
Demo Importer /wp-admin/admin.php?page=realty-pack-core-importer1,0881.8526.5829.10
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,1601.9133.4031.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/realtypack-core/controllers/admin/dashboard/plugin.php+78
    Trying to access array offset on value of type bool
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_theysaidso_widget
    • elementor_cpt_support
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_rtpc\controllers\admin\widgets\rtpc_controllers_admin_widgets_posts
    • widget_rtpc\controllers\admin\widgets\rtpc_controllers_admin_widgets_social
    • widget_recent-comments
    • can_compress_scripts
    • acf_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 25 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Notice in wp-content/plugins/realtypack-core/controllers/admin/dashboard/importer.php+80
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=realty-pack-core-importer
    • > Warning in wp-content/plugins/realtypack-core/controllers/admin/dashboard/importer.php+133
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/admin.php?page=realty-pack-core-importer
    • > Notice in wp-content/plugins/realtypack-core/controllers/admin/dashboard/importer.php+102
    Undefined variable: demos
    • > GET request to /wp-admin/admin.php?page=realty-pack-core-importer
    • > Deprecated in wp-content/plugins/realtypack-core/controllers/admin/dashboard/importer.php+144
    Non-static method RTPC\Controllers\Admin\Dashboard\RTPC_Controllers_Admin_Dashboard_Boot::header() should not be called statically
    • > GET request to /wp-admin/admin.php?page=realty-pack-core-importer
    • > Deprecated in wp-content/plugins/realtypack-core/controllers/admin/dashboard/importer.php+147
    Non-static method RTPC\Controllers\Admin\Dashboard\RTPC_Controllers_Admin_Dashboard_Boot::footer() should not be called statically

SRP 0% 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
  • 31× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/realtypack-core/views/tpl/admin/importer.php
    • > /wp-content/plugins/realtypack-core/views/tpl/widgets/agency/logo.php
    • > /wp-content/plugins/realtypack-core/views/tpl/widgets/agent/details.php
    • > /wp-content/plugins/realtypack-core/views/tpl/widgets/agency/cover.php
    • > /wp-content/plugins/realtypack-core/views/tpl/widgets/testimonial.php
    • > /wp-content/plugins/realtypack-core/views/tpl/admin/plugins.php
    • > /wp-content/plugins/realtypack-core/views/tpl/widgets/single/title.php
    • > /wp-content/plugins/realtypack-core/app/kirki/controls/views/select.php
    • > /wp-content/plugins/realtypack-core/app/kirki/controls/views/code.php
    • > /wp-content/plugins/realtypack-core/views/tpl/widgets/iconbox-carousel.php
  • 416× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/realtypack-core/controllers/elementor/widgets/single/agent.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'RTPC\\controllers\\RTPC_Controllers_Public' not found in wp-content/plugins/realtypack-core/controllers/elementor/modules/advance.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'RTPC\\Controllers\\Admin\\Dashboard\\RTPC_Controllers_Admin_Dashboard_Boot' not found in wp-content/plugins/realtypack-core/controllers/admin/dashboard/dashboard.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/realtypack-core/views/tpl/widgets/agency/details.php on line 55
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/realtypack-core/views/tpl/widgets/agent/details.php on line 10
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/realtypack-core/views/tpl/widgets/agency/socials.php on line 22
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/realtypack-core/views/tpl/widgets/agent/socials.php on line 28
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/realtypack-core/controllers/elementor/widgets/single/refresh.php:19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/realtypack-core/views/tpl/widgets/single/details.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/realtypack-core/views/tpl/widgets/single/googlemap.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #8 (Price Package)
The official readme.txt might help

realtypack-core/realtypack-core.php 85% from 13 tests

The main file in "Realty Pack Core" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 169 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin163,145 lines of code in 695 files:
LanguageFilesBlank linesComment linesLines of code
PO File4522,54136,58148,731
PHP45718,04233,34047,682
JavaScript10810,4319,07036,600
CSS262,08720914,681
JSON5008,442
Sass471,3211166,693
SVG4250256
YAML17027
SQL15419
Markdown111014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.02
▷ Minimum class complexity1.00
▷ Maximum class complexity204.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces26
Interfaces0
Traits2
Classes353
▷ Abstract classes41.13%
▷ Concrete classes34998.87%
▷ Final classes144.01%
Methods1,995
▷ Static methods1849.22%
▷ Public methods1,55677.99%
▷ Protected methods40920.50%
▷ Private methods301.50%
Functions457
▷ Named functions43394.75%
▷ Anonymous functions245.25%
Constants31
▷ Global constants2477.42%
▷ Class constants722.58%
▷ Public constants7100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
34 PNG files occupy 2.04MB with 1.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/assets/admin/img/profile.png196.25KB83.87KB▼ 57.26%
views/assets/admin/img/Group-13@2x.png17.00KB6.99KB▼ 58.90%
views/assets/img/google-favicon.png1.01KB1.17KB0.00%
views/assets/admin/img/elementor.png47.90KB10.26KB▼ 78.58%
views/assets/img/cover.png48.05KB21.55KB▼ 55.15%