67% classified-listing

Code Review | Classified Listing – Classified ads & Business Directory Plugin

WordPress plugin Classified Listing – Classified ads & Business Directory Plugin scored67%from 54 tests.

About plugin

  • Plugin page: classified-listing
  • Plugin version: 2.6.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Aug 29, 2018
  • Latest release: Nov 28, 2023
  • Number of updates: 229
  • Update frequency: every 8.7 days
  • Top authors: techlabpro1 (100%)

Code review

54 tests

User reviews

72 reviews

Install metrics

10,000+ active /299,138 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲7.09MB] [CPU: ▲42.32ms] 50% from 4 tests

This is a short check of server-side resources used by Classified Listing – Classified ads & Business Directory Plugin
Please fix the following
  • RAM: Try to keep total memory usage under 10MB (currently 10.47MB on /wp-admin/edit.php?post_type=rtcl_payment)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 7.09MB on /wp-admin/edit.php?post_type=rtcl_payment)
PageMemory (MB)CPU Time (ms)
Home /10.88 ▲7.4189.83 ▲40.90
Dashboard /wp-admin10.45 ▲7.1184.10 ▲22.93
Posts /wp-admin/edit.php10.45 ▲7.10101.33 ▲55.14
Add New Post /wp-admin/post-new.php12.80 ▲6.92151.13 ▲58.21
Media Library /wp-admin/upload.php10.45 ▲7.2284.67 ▲50.29
Add New /wp-admin/post-new.php?post_type=rtcl_listing10.92111.55
Pricing /wp-admin/edit.php?post_type=rtcl_pricing10.4583.09
Tags /wp-admin/edit-tags.php?taxonomy=rtcl_tag&post_type=rtcl_listing10.4573.32
Custom Fields /wp-admin/edit.php?post_type=rtcl_cfg10.4575.93
Settings /wp-admin/edit.php?post_type=rtcl_listing&page=rtcl-settings10.5175.07
All Listings /wp-admin/edit.php?post_type=rtcl_listing10.4876.98
Locations /wp-admin/edit-tags.php?taxonomy=rtcl_location&post_type=rtcl_listing10.4580.21
Import /wp-admin/edit.php?post_type=rtcl_listing&page=rtcl-import-export10.4570.36
Categories /wp-admin/edit-tags.php?taxonomy=rtcl_category&post_type=rtcl_listing10.4576.03
Payment History /wp-admin/edit.php?post_type=rtcl_payment10.4776.55

Server storage [IO: ▲14.09MB] [DB: ▲0.03MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 568 new files
Database: 1 new table, 24 new options
New tables
wp_rtcl_sessions
New WordPress options
rtcl_email_user_settings_updated_temp
rtcl_general_settings
widget_recent-posts
theysaidso_admin_options
widget_rtcl-widget-search
rtcl_chat_settings
can_compress_scripts
widget_recent-comments
rtcl_queue_flush_rewrite_rules
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Classified Listing – Classified ads & Business Directory Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,305 ▲55815.41 ▲0.8248.28 ▲46.4237.13 ▼5.63
Dashboard /wp-admin2,346 ▲1755.61 ▲0.0093.67 ▼5.2084.28 ▲37.58
Posts /wp-admin/edit.php2,256 ▲1562.16 ▲0.2039.03 ▼1.1134.25 ▼2.97
Add New Post /wp-admin/post-new.php6,447 ▲4,91831.87 ▲8.751,025.12 ▲428.02222.16 ▲168.61
Media Library /wp-admin/upload.php1,548 ▲1544.19 ▼0.0397.34 ▼4.2876.50 ▲31.22
Add New /wp-admin/post-new.php?post_type=rtcl_listing4,02411.44299.73111.07
Pricing /wp-admin/edit.php?post_type=rtcl_pricing1,3642.7945.1331.54
Tags /wp-admin/edit-tags.php?taxonomy=rtcl_tag&post_type=rtcl_listing1,3942.4329.0735.13
Custom Fields /wp-admin/edit.php?post_type=rtcl_cfg1,3973.0651.1553.73
Settings /wp-admin/edit.php?post_type=rtcl_listing&page=rtcl-settings2,8364.1775.77106.01
All Listings /wp-admin/edit.php?post_type=rtcl_listing1,6784.8099.6465.11
Locations /wp-admin/edit-tags.php?taxonomy=rtcl_location&post_type=rtcl_listing1,4782.3332.4938.00
Import /wp-admin/edit.php?post_type=rtcl_listing&page=rtcl-import-export1,0009.2683.2440.18
Categories /wp-admin/edit-tags.php?taxonomy=rtcl_category&post_type=rtcl_listing4,0562.4530.0741.92
Payment History /wp-admin/edit.php?post_type=rtcl_payment1,4472.7944.4131.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_rtcl_sessions
  • Zombie WordPress options were found after uninstall: 24 options
    • rtcl_general_settings
    • rtcl_payment_settings
    • rtcl_style_settings
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • rtcl_advanced_settings
    • current_theme_supports_rtcl
    • widget_rtcl-widget-listing
    • widget_rtcl-widget-search
    • ...

Smoke tests 50% 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 0% 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
  • 11× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/classified-listing/app/Controllers/Elementor/WidgetSettings/FormFieldSettings.php
    • > /wp-content/plugins/classified-listing/app/Controllers/Elementor/WidgetSettings/IconSettings.php
    • > /wp-content/plugins/classified-listing/templates/block/category-box/style-1.php
    • > /wp-content/plugins/classified-listing/classified-listing.php
    • > /wp-content/plugins/classified-listing/app/Abstracts/ElementorWidgetBaseV2.php
    • > /wp-content/plugins/classified-listing/templates/listing/social-share.php
    • > /wp-content/plugins/classified-listing/templates/elementor/search/fields/types-field.php
    • > /wp-content/plugins/classified-listing/templates/elementor/search/fields/price-field.php
    • > /wp-content/plugins/classified-listing/app/Controllers/Elementor/WidgetSettings/ButtonSettings.php
    • > /wp-content/plugins/classified-listing/templates/elementor/search/fields/category-field.php
  • 230× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: can_search_by_price in wp-content/plugins/classified-listing/templates/widgets/search/inline.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'Rtcl\\Models\\RtclEmail' not found in wp-content/plugins/classified-listing/app/Emails/ContactEmailToAdmin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Rtcl\\Models\\RtclEmail' not found in wp-content/plugins/classified-listing/app/Emails/OrderCreatedEmailToCustomer.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/classified-listing/templates/block/all-location/grid/style-1.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Rtcl\\Models\\RtclEmail' not found in wp-content/plugins/classified-listing/app/Emails/OrderCreatedEmailToAdmin.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Rtcl\\Models\\RtclEmail' not found in wp-content/plugins/classified-listing/app/Emails/ListingModerationEmailToOwner.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/classified-listing/templates/listing-form/contact.php:30
    • > PHP Warning
      in_array() expects parameter 2 to be array, null given in wp-content/plugins/classified-listing/templates/listing/social-share.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/classified-listing/views/settings/listing-type.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/classified-listing/views/settings/admin-settings-display.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

classified-listing/classified-listing.php 92% from 13 tests

"Classified Listing – Classified ads & Business Directory Plugin" version 2.6.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 168 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin149,707 lines of code in 524 files:
LanguageFilesBlank linesComment linesLines of code
PHP4509,38015,19765,595
JSON110058,357
CSS111,22279614,523
JavaScript388528968,624
Markdown728101,181
C111825668
SVG35991660
XML14059
m418032
C/C++ Header14128

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.45
Average class complexity22.70
▷ Minimum class complexity1.00
▷ Maximum class complexity764.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces49
Interfaces12
Traits28
Classes234
▷ Abstract classes114.70%
▷ Concrete classes22395.30%
▷ Final classes31.35%
Methods2,577
▷ Static methods86333.49%
▷ Public methods2,25387.43%
▷ Protected methods1074.15%
▷ Private methods2178.42%
Functions38
▷ Named functions923.68%
▷ Anonymous functions2976.32%
Constants84
▷ Global constants1517.86%
▷ Class constants6982.14%
▷ Public constants5376.81%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
24 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/video-play.png2.53KB2.74KB0.00%
assets/images/icon-32.png0.97KB0.12KB▼ 88.15%
app/Gateways/Paypal/images/paypal.png2.40KB1.69KB▼ 29.54%
app/Gateways/Paypal/assets/images/paypal.png2.40KB1.69KB▼ 29.54%
assets/images/map/buy.png3.12KB1.77KB▼ 43.28%