84% dirt-directory-client

Code Review | DiRT Directory Client

WordPress plugin DiRT Directory Client scored84%from 54 tests.

About plugin

  • Plugin page: dirt-directory-cl...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 2, 2015
  • Latest release: Apr 19, 2018
  • Number of updates: 14
  • Update frequency: every 81.9 days
  • Top authors: boonebgorges (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.91ms] Passed 4 tests

Server-side resources used by DiRT Directory Client
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0636.20 ▼0.49
Dashboard /wp-admin3.38 ▲0.0345.15 ▼16.70
Posts /wp-admin/edit.php3.43 ▲0.0747.67 ▼0.50
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.60 ▼13.94
Media Library /wp-admin/upload.php3.30 ▲0.0734.72 ▲1.28

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
ddc_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for DiRT Directory Client
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.57 ▼0.801.71 ▼0.0540.06 ▲3.31
Dashboard /wp-admin2,203 ▲144.85 ▼0.06105.99 ▼0.8841.99 ▼2.81
Posts /wp-admin/edit.php2,089 ▼31.97 ▼0.0638.36 ▼4.3135.82 ▼2.78
Add New Post /wp-admin/post-new.php1,533 ▲1423.35 ▲0.14578.92 ▼97.3859.43 ▲11.19
Media Library /wp-admin/upload.php1,385 ▼34.25 ▲0.05102.18 ▲0.4039.83 ▼8.42

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • ddc_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/dirt-directory-client/tests/test-request.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dirt-directory-client/templates/dirt/directory.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dirt-directory-client/includes/theme-compatibility.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dirt-directory-client/includes/bpbd-integration.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dirt-directory-client/templates/dirt/explore.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'BP_Group_Extension' not found in wp-content/plugins/dirt-directory-client/includes/bp-groups-integration.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dirt-directory-client/includes/user-integration.php:393
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/dirt-directory-client/templates/dirt/single.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'BP_UnitTestCase' not found in wp-content/plugins/dirt-directory-client/tests/test-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dirt-directory-client/includes/bp-integration.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: dirt, tools, digital, buddypress

dirt-directory-client/loader.php 92% from 13 tests

The principal PHP file in "DiRT Directory Client" v. 1.2.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("dirt-directory-client.php" instead of "loader.php")

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
No dangerous file extensions were detected2,317 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP224318191,705
Sass3400291
SVG100135
JavaScript1151074
Bourne Shell115459
Markdown115020
XML10014
YAML14012
Ruby1106
CSS1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity2.75
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.26
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods53
▷ Static methods00.00%
▷ Public methods4890.57%
▷ Protected methods59.43%
▷ Private methods00.00%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin