61% wp-business-directory-free

Code Review | WP Business Directory FREE

WordPress plugin WP Business Directory FREEscored61%from 54 tests.

About plugin

  • Plugin page: wp-business-direc...
  • Plugin version: 1.0.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.5
  • WordPress version: 6.3.1
  • First release: Feb 17, 2018
  • Latest release: May 17, 2018
  • Number of updates: 40
  • Update frequency: every 2.3 days
  • Top authors: jtibbles (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,584 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.49MB] [CPU: ▼1.15ms] Passed 4 tests

Server-side resources used by WP Business Directory FREE
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4646.12 ▼1.41
Dashboard /wp-admin3.85 ▲0.5555.93 ▲8.11
Posts /wp-admin/edit.php3.91 ▲0.5555.76 ▲3.18
Add New Post /wp-admin/post-new.php6.35 ▲0.4790.96 ▼7.95
Media Library /wp-admin/upload.php3.70 ▲0.4739.64 ▲1.59
Add New Business /wp-admin/admin.php?page=wpbdf_add_business3.8036.86
Business Categories /wp-admin/edit-tags.php?taxonomy=business-cat-free3.8442.09
WPBD Free /wp-admin/admin.php?page=wpbdf3.7835.43
Businesses /wp-admin/admin.php?page=wpbdf_view_entries3.7837.59
Deactivate Business /wp-admin/admin.php?page=wpbdf_deact_business3.6636.00
Settings /wp-admin/admin.php?page=wpbdf_settings3.7134.52
Activate Business /wp-admin/admin.php?page=wpbdf_act_business3.6635.23
Email Options /wp-admin/admin.php?page=wpbdf_email_options3.7137.73
Tutorials /wp-admin/admin.php?page=wpbdf_tutorials3.6939.38
Business Types /wp-admin/edit-tags.php?taxonomy=business-type-free3.8451.60

Server storage [IO: ▲1.91MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 64 new files
Database: 4 new tables, 6 new options
New tables
wp_wpbdf_listings
wp_wpbdf_settings
wp_wpbdf_postcode_recycle
wp_wpbdf_emailer
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Business Directory FREE
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,177 ▲43116.05 ▲1.4729.75 ▲27.8643.07 ▲2.32
Dashboard /wp-admin2,395 ▲2046.44 ▲1.39127.04 ▲3.9139.31 ▼16.10
Posts /wp-admin/edit.php2,301 ▲2093.29 ▲1.2850.16 ▲7.1045.86 ▲10.06
Add New Post /wp-admin/post-new.php1,711 ▲19722.19 ▲4.56666.93 ▼11.0738.85 ▼16.74
Media Library /wp-admin/upload.php1,446 ▲584.27 ▲0.0780.98 ▼27.3542.49 ▼3.32
Add New Business /wp-admin/admin.php?page=wpbdf_add_business3,2916.59152.06147.71
Business Categories /wp-admin/edit-tags.php?taxonomy=business-cat-free1,4773.1049.6033.81
WPBD Free /wp-admin/admin.php?page=wpbdf1,2333.1239.4881.72
Businesses /wp-admin/admin.php?page=wpbdf_view_entries1,2333.0637.2172.40
Deactivate Business /wp-admin/admin.php?page=wpbdf_deact_business9843.0137.2119.91
Settings /wp-admin/admin.php?page=wpbdf_settings1,3613.0240.4074.59
Activate Business /wp-admin/admin.php?page=wpbdf_act_business9843.0337.1220.21
Email Options /wp-admin/admin.php?page=wpbdf_email_options1,4723.1439.3589.00
Tutorials /wp-admin/admin.php?page=wpbdf_tutorials1,0433.1037.5168.10
Business Types /wp-admin/edit-tags.php?taxonomy=business-type-free1,4833.1343.8631.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 4 tables
    • wp_wpbdf_emailer
    • wp_wpbdf_settings
    • wp_wpbdf_listings
    • wp_wpbdf_postcode_recycle
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wpbdf_add_business
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-create-business-admin.php+57
    Undefined variable: dateFormat_text_view
    • > GET request to /wp-admin/admin.php?page=wpbdf_add_business
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-create-business-admin.php+102
    Undefined index: address
    • > GET request to /wp-admin/admin.php?page=wpbdf_add_business
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-create-business-admin.php+479
    Undefined variable: lat
    • > GET request to /wp-admin/admin.php?page=wpbdf_add_business
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-create-business-admin.php+481
    Undefined variable: long
    • > GET request to /wp-admin/admin.php?page=wpbdf_add_business
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-create-business-admin.php+609
    Undefined index: desc
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_view_entries
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-view-all-businesses.php+131
    Undefined index: pg
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_view_entries
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-view-all-businesses.php+133
    Undefined variable: filteascdesc
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_view_entries
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_view_entries
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-view-all-businesses.php+270
    Undefined variable: total
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_act_business
    • > Notice in wp-content/plugins/wp-business-directory-free/wp-business-directory-free.php+209
    Undefined index: filter-name
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_act_business
    • > Notice in wp-content/plugins/wp-business-directory-free/wp-business-directory-free.php+210
    Undefined index: filter-email
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_act_business
    • > Notice in wp-content/plugins/wp-business-directory-free/wp-business-directory-free.php+211
    Undefined index: filter-sort
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_act_business
    • > Notice in wp-content/plugins/wp-business-directory-free/wp-business-directory-free.php+212
    Undefined index: filter-ascdesc
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpbdf_act_business
    • > Notice in wp-content/plugins/wp-business-directory-free/wp-business-directory-free.php+213
    Undefined index: filter-status
    • > GET request to /wp-admin/admin.php?page=wpbdf_settings
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-settings.php+98
    Undefined index: _tcs
    • > GET request to /wp-admin/admin.php?page=wpbdf_email_options
    • > Notice in wp-content/plugins/wp-business-directory-free/admin/wpbdf-view-all-emails.php+131
    Undefined variable: wpbdf_version

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-business-directory-free/wp-business-directory-free.php
  • 19× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-business-directory-free/admin/wpbdf-settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-business-directory-free/functions/admin.php:6
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-business-directory-free/functions/setup.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-business-directory-free/admin/wpbdf-view-all-emails.php:35
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-business-directory-free/functions/setup.php on line 11
    • > PHP Notice
      Undefined variable: main_page in wp-content/plugins/wp-business-directory-free/template/user-businesses/wpbdf-notice-page.php on line 21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-business-directory-free/template/wpbdf-business-details-page.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-business-directory-free/admin/wpbdf-view-all-businesses.php:75
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_requests() in wp-content/plugins/wp-business-directory-free/admin/wpbdf-create-business-admin.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-business-directory-free/functions/search.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 75% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: Contributors not specified
  • Screenshots: These screenshots need descriptions #1, #2 in wp-business-directory-free/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === WP Business Directory FREE=== )
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

wp-business-directory-free/wp-business-directory-free.php 92% from 13 tests

The entry point to "WP Business Directory FREE" version 1.0.8.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 356 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected10,896 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP171,6222035,385
SVG1002,671
CSS8185541,874
JavaScript1031374966

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions77
▷ Named functions77100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
13 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/social/yt.png1.64KB1.60KB▼ 2.56%
img/arrows.png1.40KB1.36KB▼ 2.65%
template/img/icons.png1.41KB0.81KB▼ 42.04%
img/social/li.png1.93KB1.87KB▼ 3.53%
template/img/pin_spacing.png2.58KB1.83KB▼ 29.19%