79% directorypress-frontend

Code Review | DirectoryPress Frontend

WordPress plugin DirectoryPress Frontend scored79%from 54 tests.

About plugin

  • Plugin page: directorypress-fr...
  • Plugin version: 2.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 23, 2022
  • Latest release: Oct 17, 2023
  • Number of updates: 26
  • Update frequency: every 15.0 days
  • Top authors: designinvento (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /8,022 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.46ms] Passed 4 tests

An overview of server-side resources used by DirectoryPress Frontend
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.66 ▲4.81
Dashboard /wp-admin3.39 ▲0.0848.11 ▲0.62
Posts /wp-admin/edit.php3.50 ▲0.1445.45 ▼4.01
Add New Post /wp-admin/post-new.php5.97 ▲0.0882.17 ▼8.74
Media Library /wp-admin/upload.php3.31 ▲0.0832.40 ▼1.72

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 74 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for DirectoryPress Frontend
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.361.49 ▼0.0237.46 ▼2.28
Dashboard /wp-admin2,192 ▲155.51 ▼0.1480.78 ▼5.3237.24 ▼4.75
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0534.85 ▼1.0735.85 ▼2.06
Add New Post /wp-admin/post-new.php1,536 ▲1023.02 ▼1.01638.80 ▼44.2049.22 ▼4.94
Media Library /wp-admin/upload.php1,400 ▼34.24 ▲0.0193.99 ▼5.4540.77 ▼3.02

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/directorypress-frontend/public/partials/directorypress-frontend-public-display.php
  • 60× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'directorypress_public' not found in wp-content/plugins/directorypress-frontend/includes/directorypress_class_submit.php:3
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/directorypress-frontend/public/package_details.php on line 69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/directorypress-frontend/includes/general-function.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function dpfl_renderTemplate() in wp-content/plugins/directorypress-frontend/public/create_advert_packages.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/directorypress-frontend/public/messages.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/directorypress-frontend/public/view_stats.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/directorypress-frontend/public/email_verification_required.php:4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/directorypress-frontend/public/package_details.php on line 69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/directorypress-frontend/public/partials/dashboard/template-dashboard.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Elementor\\Widget_Base' not found in wp-content/plugins/directorypress-frontend/includes/elementor/directorypress-pricing-plans.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: car dealer, directories, directory listing, classified, business directory

directorypress-frontend/directorypress-frontend.php Passed 13 tests

The main PHP script in "DirectoryPress Frontend" version 2.7.4 is automatically included on every request by WordPress
61 characters long description:
Frontend Ads listing functionality for DirectoryPress Plugin.

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
There were no executable files found in this plugin15,646 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
CSS729327910,145
PHP435554894,871
JavaScript44040630

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity25.75
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods66
▷ Static methods23.03%
▷ Public methods5786.36%
▷ Protected methods46.06%
▷ Private methods57.58%
Functions49
▷ Named functions49100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/plus_minus_icons.png4.05KB1.42KB▼ 65.09%
assets/images/minus.png0.90KB0.08KB▼ 91.03%
assets/images/phone-normal.png1.37KB0.68KB▼ 50.32%
assets/images/phone-active.png1.38KB0.73KB▼ 47.05%
assets/images/email-active.png1.55KB0.78KB▼ 49.94%