84% dt-directory-lite-addon

Code Review | DT Directory Lite Addon

WordPress plugin DT Directory Lite Addon scored84%from 54 tests.

About plugin

  • Plugin page: dt-directory-lite...
  • Plugin version: 1.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 6.3.1
  • First release: Dec 10, 2020
  • Latest release: Sep 17, 2022
  • Number of updates: 415
  • Update frequency: every 1.6 days
  • Top authors: designthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,937 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲1.92MB] [CPU: ▲7.48ms] Passed 4 tests

Analyzing server-side resources used by DT Directory Lite Addon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.48 ▲2.0148.90 ▲15.28
Dashboard /wp-admin5.22 ▲1.9255.13 ▲12.05
Posts /wp-admin/edit.php5.27 ▲1.9158.05 ▲11.82
Add New Post /wp-admin/post-new.php7.82 ▲1.9493.84 ▼5.82
Media Library /wp-admin/upload.php5.14 ▲1.9147.97 ▲11.88
Settings /wp-admin/edit.php?post_type=dtdr_listings&page=dtdr-settings-options5.2143.79
Property Category /wp-admin/edit-tags.php?taxonomy=dtdr_listings_category&post_type=dtdr_listings5.1345.49
Property Contract Type /wp-admin/edit-tags.php?taxonomy=dtdr_listings_ctype&post_type=dtdr_listings5.1343.26
Property Amenity /wp-admin/edit-tags.php?taxonomy=dtdr_listings_amenity&post_type=dtdr_listings5.1344.92
Directory /wp-admin/edit.php?post_type=dtdr_listings5.1844.64

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 359 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for DT Directory Lite Addon
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,049 ▲28814.47 ▲0.1220.68 ▲18.9739.61 ▲0.27
Dashboard /wp-admin2,251 ▲705.52 ▼0.1592.46 ▼4.8045.44 ▲5.77
Posts /wp-admin/edit.php2,165 ▲622.00 ▲0.0140.57 ▼1.8138.82 ▲4.19
Add New Post /wp-admin/post-new.php1,574 ▲4822.67 ▼0.23674.67 ▲39.1949.31 ▼11.96
Media Library /wp-admin/upload.php1,462 ▲624.25 ▲0.03103.57 ▲1.2645.73 ▲1.99
Settings /wp-admin/edit.php?post_type=dtdr_listings&page=dtdr-settings-options1,2242.0329.8230.73
Property Category /wp-admin/edit-tags.php?taxonomy=dtdr_listings_category&post_type=dtdr_listings1,9332.6954.8639.73
Property Contract Type /wp-admin/edit-tags.php?taxonomy=dtdr_listings_ctype&post_type=dtdr_listings1,9302.7052.0541.42
Property Amenity /wp-admin/edit-tags.php?taxonomy=dtdr_listings_amenity&post_type=dtdr_listings1,9052.7252.4741.90
Directory /wp-admin/edit.php?post_type=dtdr_listings1,2172.0832.9032.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% 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 50% 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
  • 176× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dt-directory-lite-addon/page-builders/visual-composer/modules/single-page/contact-details.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/dt-directory-lite-addon/page-builders/elementor/widgets/single-page/comment-list.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dt-directory-lite-addon/theme-support/class-designthemes.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dt-directory-lite-addon/page-builders/visual-composer/modules/single-page/price.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/dt-directory-lite-addon/page-builders/elementor/widgets/single-page/mls-number.php:7
    • > PHP Fatal error
      require_once(): Failed opening required 'DTDR_LITE_PLUGIN_PATHcustom-post-types/listings-post-type.php' (include_path='.:/usr/share/php') in wp-content/plugins/dt-directory-lite-addon/custom-post-types/register-post-types.php on line 29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dt-directory-lite-addon/page-builders/visual-composer/modules/default/listings-taxonomy.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/dt-directory-lite-addon/modules/media-images/metabox-tab-listing.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dt-directory-lite-addon/modules/media-images/page-builders/visual-composer/sp-media-images.php:2
    • > PHP Warning
      Use of undefined constant DTDR_LITE_PLUGIN_PATH - assumed 'DTDR_LITE_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dt-directory-lite-addon/settings/settings.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (39 tag instead of maximum 10)
Please take inspiration from this readme.txt

dt-directory-lite-addon/dt-directory-lite-addon.php 92% from 13 tests

The primary PHP file in "DT Directory Lite Addon" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • 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 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 plugin48,109 lines of code in 234 files:
LanguageFilesBlank linesComment linesLines of code
PHP1765,9061,22119,726
CSS252,17532815,802
SVG40129,848
JavaScript279362272,680
XML13050
Markdown1003

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.28
▷ Minimum class complexity1.00
▷ Maximum class complexity209.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes72
▷ Abstract classes00.00%
▷ Concrete classes72100.00%
▷ Final classes00.00%
Methods561
▷ Static methods274.81%
▷ Public methods45781.46%
▷ Protected methods9617.11%
▷ Private methods81.43%
Functions166
▷ Named functions16599.40%
▷ Anonymous functions10.60%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
85 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/prettyPhoto/default/sprite_next.png1.33KB0.39KB▼ 70.69%
page-builders/visual-composer/images/feature_video.png1.42KB0.22KB▼ 84.25%
assets/images/attachment.png3.69KB2.57KB▼ 30.30%
assets/images/prettyPhoto/dark_square/btnPrevious.png1.41KB1.19KB▼ 15.74%
assets/css/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%