46% ulisting

Code Review | Directory Listings WordPress plugin - uListing

WordPress plugin Directory Listings WordPress plugin - uListing scored46%from 54 tests.

About plugin

  • Plugin page: ulisting
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2019
  • Latest release: Feb 14, 2023
  • Number of updates: 119
  • Update frequency: every 12.3 days
  • Top authors: stylemix (100%)

Code review

54 tests

User reviews

28 reviews

Install metrics

3,000+ active /100,822 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲1.41MB] [CPU: ▲15.63ms] Passed 4 tests

Analyzing server-side resources used by Directory Listings WordPress plugin - uListing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.79 ▲1.3356.08 ▲13.07
Dashboard /wp-admin4.77 ▲1.4769.42 ▲17.94
Posts /wp-admin/edit.php4.83 ▲1.4774.01 ▲23.32
Add New Post /wp-admin/post-new.php7.50 ▲1.61100.25 ▲10.34
Media Library /wp-admin/upload.php4.61 ▲1.3857.94 ▲21.16
Add New Plan /wp-admin/post-new.php?post_type=stm_pricing_plans4.7961.69
Settings /wp-admin/admin.php?page=settings-page4.6552.60
/wp-admin/admin.php?page=stm_user_plans_edit4.6648.95
Status /wp-admin/admin.php?page=status-page4.6050.73
Listings /wp-admin/edit.php?post_type=listing4.7658.66
Regions /wp-admin/edit-tags.php?taxonomy=listing-region&post_type=listing4.6955.34
Upgrade /wp-admin/admin.php?page=ulisting-upgrade4.71227.17
Saved Searches /wp-admin/admin.php?page=saved-searches-page4.6054.21
Demo Import /wp-admin/admin.php?page=demo-import-page4.6045.59
/wp-admin/admin.php?page=stm_user_plans_view4.5845.55

Server storage [IO: ▲14.65MB] [DB: ▲0.04MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,182 new files
Database: 14 new tables, 25 new options
New tables
wp_ulisting_search
wp_ulisting_listing_type_relationships
wp_ulisting_user_plan_meta
wp_ulisting_attribute_term_relationships
wp_ulisting_listing_attribute_relationships
wp_ulisting_attribute_relationsh_meta
wp_ulisting_payment
wp_ulisting_payment_meta
wp_ulisting_listing_user_relations
wp_ulisting_listing_plan
...
New WordPress options
stm_current_map_type
ulisting-version
theysaidso_admin_options
ulisting_installed
ulisting_demo_import_redirect
widget_recent-comments
widget_theysaidso_widget
ulisting_listing_cron_time
stm_current_map_api_key
ulisting_category_limit
...

Browser metrics Passed 4 tests

A check of browser resources used by Directory Listings WordPress plugin - uListing
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,668 ▲89723.17 ▲8.74205.42 ▲203.2044.11 ▲2.24
Dashboard /wp-admin2,618 ▲4277.62 ▲2.74162.98 ▲62.5396.88 ▲56.79
Posts /wp-admin/edit.php2,543 ▲4575.19 ▲3.1569.62 ▲29.8837.84 ▼0.75
Add New Post /wp-admin/post-new.php1,929 ▲41521.32 ▲3.80723.65 ▲30.06210.62 ▲155.85
Media Library /wp-admin/upload.php1,690 ▲2996.35 ▲2.1893.62 ▼7.87106.00 ▲61.98
Add New Plan /wp-admin/post-new.php?post_type=stm_pricing_plans2,3748.47169.78102.48
Settings /wp-admin/admin.php?page=settings-page3,1849.53182.2467.37
/wp-admin/admin.php?page=stm_user_plans_edit1,55110.1194.6235.19
Status /wp-admin/admin.php?page=status-page1,51710.24103.7443.27
Listings /wp-admin/edit.php?post_type=listing1,9965.6377.57100.62
Regions /wp-admin/edit-tags.php?taxonomy=listing-region&post_type=listing2,49010.70166.19184.35
Upgrade /wp-admin/admin.php?page=ulisting-upgrade1,4306.7874.5950.60
Saved Searches /wp-admin/admin.php?page=saved-searches-page1,58310.4998.8050.43
Demo Import /wp-admin/admin.php?page=demo-import-page1,49410.12104.6535.78
/wp-admin/admin.php?page=stm_user_plans_view9934.0329.6029.63

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 14 tables in the database
    • wp_ulisting_attribute_term_relationships
    • wp_ulisting_attribute_relationsh_meta
    • wp_ulisting_listing_attribute_relationships
    • wp_ulisting_user_plan
    • wp_ulisting_listing_plan
    • wp_ulisting_payment
    • wp_ulisting_search
    • wp_ulisting_page_statistics
    • wp_ulisting_listing_type_relationships
    • wp_ulisting_listing_user_relations
    • ...
  • This plugin does not fully uninstall, leaving 25 options in the database
    • uListing_inserted_blog
    • ulisting_demo_import_redirect
    • widget_recent-posts
    • widget_recent-comments
    • ulisting_canceled
    • ulisting_listing_cron_time
    • ulisting-db-version
    • theysaidso_admin_options
    • ulisting-saved-searches-install
    • ulisting-version
    • ...

Smoke tests 0% 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
    • > GET request to /wp-admin/admin.php?page=stm_user_plans_view
    • > Notice in wp-content/plugins/ulisting/includes/lib/pricing-plan/includes/classes/StmUserPlan.php+160
    Undefined variable: user_plan
    • > GET request to /wp-admin/admin.php?page=stm_user_plans_view
    • > Notice in wp-content/plugins/ulisting/includes/lib/pricing-plan/views/admin/user_plan/view.php+15
    Trying to get property 'id' of non-object
    • > GET request to /wp-admin/admin.php?page=stm_user_plans_view
    • > Error in wp-content/plugins/ulisting/includes/lib/pricing-plan/views/admin/user_plan/view.php+23
    Uncaught Error: Call to a member function getUser() on null in wp-content/plugins/ulisting/includes/lib/pricing-plan/views/admin/user_plan/view.php:23
    Stack trace:
    #0 wp-content/plugins/ulisting/includes/functions.php(37): include()
    #1 wp-content/plugins/ulisting/includes/lib/pricing-plan/includes/classes/StmUserPlan.php(160): ulisting_render_template()
    #2 wp-includes/class-wp-hook.php(310): uListing\Lib\PricingPlan\Classes\StmUserPlan->render_index_view()
    #3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(517): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown

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
Almost there! Just fix the following items
  • 12× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/ulisting/includes/lib/stripe/templates/stripe/stripe-form.php
    • > /wp-content/plugins/ulisting/templates/listing/ulisting-category.php
    • > /wp-content/plugins/ulisting/includes/lib/stripe/includes/classes/vender/stripe-php/build.php
    • > /wp-content/plugins/ulisting/templates/email/saved-searches/notification-saved-searches-listing-list.php
    • > /wp-content/plugins/ulisting/templates/components/fields/search.php
    • > /wp-content/plugins/ulisting/templates/listing/ulisting-feature.php
    • > /wp-content/plugins/ulisting/includes/admin/views/notices/pro_popup.php
    • > /wp-content/plugins/ulisting/includes/lib/paypal-standard/templates/paypal-form.php
    • > /wp-content/plugins/ulisting/templates/region/region-list-short-code.php
    • > /wp-content/plugins/ulisting/templates/email/saved-searches/notification-saved-searches.php
  • 586× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ULISTING_URL - assumed 'ULISTING_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ulisting/includes/lib/stripe/stripe.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'uListing\\Lib\\PricingPlan\\Classes\\StmUserPlan' not found in wp-content/plugins/ulisting/templates/account/my-plans/detail.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'UlistingResponse' not found in wp-content/plugins/ulisting/includes/classes/vendor/wp-router/responses/class-wp-redirect-response.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/ulisting/includes/lib/stripe/includes/classes/vender/stripe-php/lib/EphemeralKey.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PayPal\\Common\\PayPalModel' not found in wp-content/plugins/ulisting/includes/lib/paypal/includes/classes/vender/paypal/rest-api-sdk-php/lib/PayPal/Api/TemplateData.php:36
    • > PHP Warning
      require_once(ULISTING_PATH/includes/lib/paypal/includes/classes/vender/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ulisting/includes/lib/paypal/autoload.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/ulisting/includes/lib/stripe/includes/classes/vender/stripe-php/lib/Subscription.php:35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ulisting/templates/profile/profile_form/style_1.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'uListing\\Classes\\Vendor\\StmBaseModel' not found in wp-content/plugins/ulisting/includes/classes/StmComment.php:8
    • > PHP Warning
      Use of undefined constant ULISTING_PATH_LIB_PAYPAL_STANDARD - assumed 'ULISTING_PATH_LIB_PAYPAL_STANDARD' (this will throw an Error in a future version of PHP) in wp-content/plugins/ulisting/includes/lib/paypal-standard/autoload.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=stm_pricing_plans
    • > Network (severe)
    1/api/pricing-plan/form-data?pricing_plan_id=11 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=settings-page
    • > Console-api (warning) in wp-content/plugins/ulisting/assets/js/admin/dist/app.js?ver=2.1.5+1:94364
    Options props is deprecated, add sortable options directly as vue.draggable item, or use v-bind. See https://github.com/SortableJS/Vue.Draggable/blob/master/documentation/migrate.md#options-props
    • > GET request to /wp-admin/edit-tags.php?taxonomy=listing-region&post_type=listing
    • > Console-api (severe) in unknown
    https://maps.googleapis.com/maps/api/js?key=&libraries=places&callback=vueGoogleMapsInit 153:248 "You are using this API without a key. See https://developers.google.com/maps/documentation/javascript/error-messages?utm_source=maps_js&utm_medium=degraded&utm_campaign=billing#api-key-and-billing-errors"

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #10, #11, #12, #13, #14, #15, #16, #2, #3, #4, #5, #6, #7, #8, #9 in ulisting/assets to your readme.txt
The official readme.txt might help

ulisting/uListing.php 85% from 13 tests

The primary PHP file in "Directory Listings WordPress plugin - uListing" version 2.1.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ulisting.php" instead of "uListing.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 207 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/ulisting/includes/lib/stripe/includes/classes/vender/stripe-php/data/ca-certificates.crt
122,923 lines of code in 1,032 files:
LanguageFilesBlank linesComment linesLines of code
PHP6138,79525,10554,015
JavaScript3513,3691,33226,441
SVG150024,064
CSS401,64124517,241
Markdown53340892
JSON500205
XML28064
HTML1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity12.35
▷ Minimum class complexity1.00
▷ Maximum class complexity624.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity92.00
Code structure
Namespaces38
Interfaces8
Traits9
Classes375
▷ Abstract classes154.00%
▷ Concrete classes36096.00%
▷ Final classes10.28%
Methods3,727
▷ Static methods1,02727.56%
▷ Public methods3,53494.82%
▷ Protected methods932.50%
▷ Private methods1002.68%
Functions128
▷ Named functions7256.25%
▷ Anonymous functions5643.75%
Constants466
▷ Global constants296.22%
▷ Class constants43793.78%
▷ Public constants437100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
59 PNG files occupy 0.64MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/ulisting-logo-header.png2.76KB2.26KB▼ 18.12%
includes/lib/stripe/assets/images/stripe.png3.19KB2.52KB▼ 21.17%
assets/img/title.png2.64KB0.72KB▼ 72.86%
assets/img/compare.png3.56KB2.23KB▼ 37.47%
assets/img/socials/instagram.png1.25KB1.28KB0.00%