66% connections

Code Review | Connections Business Directory

WordPress plugin Connections Business Directory scored66%from 54 tests.

About plugin

  • Plugin page: connections
  • Plugin version: 10.4.59
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Jan 5, 2009
  • Latest release: Dec 1, 2023
  • Number of updates: 1,489
  • Update frequency: every 3.7 days
  • Top authors: shazahm1@hotmail.com (100%)

Code review

54 tests

User reviews

426 reviews

Install metrics

8,000+ active /1,294,669 total downloads

Benchmarks

Plugin footprint 63% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲8.86MB] [CPU: ▲66.33ms] 25% from 4 tests

Server-side resources used by Connections Business Directory
Please have a look at the following items
  • RAM: Total memory usage should be kept under 10MB (currently 12.27MB on /wp-admin/admin.php?page=connections_roles)
  • CPU: You should keep total CPU usage under 500.00ms (currently 541.48ms on /wp-admin/admin.php?page=connections_dashboard)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 8.86MB on /wp-admin/admin.php?page=connections_roles)
PageMemory (MB)CPU Time (ms)
Home /11.83 ▲8.37107.73 ▲70.12
Dashboard /wp-admin12.35 ▲9.00105.79 ▲46.84
Posts /wp-admin/edit.php12.42 ▲9.07121.59 ▲73.25
Add New Post /wp-admin/post-new.php16.07 ▲10.19163.48 ▲75.11
Media Library /wp-admin/upload.php12.22 ▲8.99116.49 ▲86.21
Add Entry /wp-admin/admin.php?page=connections_add14.04153.09
Dashboard /wp-admin/admin.php?page=connections_dashboard13.47541.48
Categories /wp-admin/admin.php?page=connections_manage_category_terms13.07104.64
Log Types /wp-admin/edit-tags.php?taxonomy=cn_log_type&post_type=cn_log12.3896.07
All Logs /wp-admin/edit.php?post_type=cn_log12.35100.15
Manage /wp-admin/admin.php?page=connections_manage13.36105.18
Templates /wp-admin/admin.php?page=connections_templates12.2897.69
Tools /wp-admin/admin.php?page=connections_tools12.3192.46
Settings /wp-admin/admin.php?page=connections_settings13.28111.28
Roles /wp-admin/admin.php?page=connections_roles12.2795.07

Server storage [IO: ▲28.54MB] [DB: ▲0.12MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • Try to limit filesystem usage to 25MB (currently using 28.54MB)
Filesystem: 2,128 new files
Database: 13 new tables, 44 new options
New tables
wp_connections_term_taxonomy
wp_connections_address
wp_connections_email
wp_connections
wp_connections_social
wp_connections_term_meta
wp_connections_terms
wp_connections_meta
wp_connections_link
wp_connections_messenger
...
New WordPress options
connections_fieldset-date
db_upgraded
connections_template_card
connections_debug
connections_google_maps_geocoding_api
connections_display_general
connections_geo
connections_list_actions
connections_options
connections_fieldset-phone
...

Browser metrics Passed 4 tests

An overview of browser requirements for Connections Business Directory
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14014.21 ▼0.501.88 ▲0.2336.93 ▼1.85
Dashboard /wp-admin2,275 ▲985.53 ▲0.0296.63 ▼5.4877.87 ▲34.02
Posts /wp-admin/edit.php2,198 ▲951.97 ▲0.0339.53 ▲2.1135.44 ▲2.09
Add New Post /wp-admin/post-new.php1,582 ▲5620.31 ▼3.06782.58 ▲184.3677.87 ▲33.15
Media Library /wp-admin/upload.php1,486 ▲924.17 ▼0.00112.73 ▲15.3375.29 ▲29.28
Add Entry /wp-admin/admin.php?page=connections_add3,07210.34250.45169.63
Dashboard /wp-admin/admin.php?page=connections_dashboard1,6733.1965.5647.00
Categories /wp-admin/admin.php?page=connections_manage_category_terms1,8356.38112.3684.53
Log Types /wp-admin/edit-tags.php?taxonomy=cn_log_type&post_type=cn_log1,4872.2731.1836.11
All Logs /wp-admin/edit.php?post_type=cn_log1,1641.9136.2432.74
Manage /wp-admin/admin.php?page=connections_manage1,3272.8441.4433.19
Templates /wp-admin/admin.php?page=connections_templates1,1892.5335.2529.82
Tools /wp-admin/admin.php?page=connections_tools1,1872.6638.0325.79
Settings /wp-admin/admin.php?page=connections_settings3,0867.69169.59188.31
Roles /wp-admin/admin.php?page=connections_roles1,4772.5636.0431.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure failed, leaving 13 tables in the database
    • wp_connections_phone
    • wp_connections_date
    • wp_connections_term_taxonomy
    • wp_connections_address
    • wp_connections_terms
    • wp_connections
    • wp_connections_email
    • wp_connections_term_meta
    • wp_connections_term_relationships
    • wp_connections_link
    • ...
  • This plugin does not fully uninstall, leaving 44 options in the database
    • connections_login
    • connections_fieldset-email
    • connections_fieldset-messenger
    • connections_display_single
    • connections_list_actions
    • connections_fieldset-link
    • connections_fieldset-social-networks
    • connections_entry_actions
    • connections_seo
    • db_upgraded
    • ...

Smoke tests 50% 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 0% 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
  • 7× PHP files output text when accessed directly:
    • > /wp-content/plugins/connections/templates/entry/phone-numbers/phone-admin.php
    • > /wp-content/plugins/connections/templates/entry/links/link-admin.php
    • > /wp-content/plugins/connections/includes/Taxonomy/Partials/edit-taxonomy-term.php
    • > /wp-content/plugins/connections/templates/entry/addresses/address-hcard.php
    • > /wp-content/plugins/connections/templates/entry/email-addresses/email-admin.php
    • > /wp-content/plugins/connections/templates/entry/messenger/messenger-admin.php
    • > /wp-content/plugins/connections/templates/entry/social-networks/social-networks-admin.php
  • 236× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/connections/includes/Taxonomy/Widget.php:19
    • > PHP Fatal error
      Uncaught Error: Call to a member function getName() on null in wp-content/plugins/connections/templates/entry/email-addresses/email-hcard.php:22
    • > PHP Notice
      Undefined variable: entry in wp-content/plugins/connections/templates/team-grid-card-slide/card.php on line 15
    • > PHP Notice
      Undefined variable: entry in wp-content/plugins/connections/templates/entry/email-addresses/email-hcard.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/connections/templates/entry/dates/date-hcard.php:61
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/connections/templates/entry/links/link-hcard.php on line 34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/connections/templates/entry/phone-numbers/phone-hcard.php:76
    • > PHP Fatal error
      Uncaught Error: Call to a member function showUI() on null in wp-content/plugins/connections/includes/Taxonomy/Partials/manage-taxonomy-terms.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/connections/cache/index.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Connections_Directory\\Request\\Input' not found in wp-content/plugins/connections/includes/Request/Integer.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

connections/connections.php 92% from 13 tests

The principal PHP file in "Connections Business Directory" v. 10.4.59 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("6.0" instead of "5.8")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin106,576 lines of code in 1,910 files:
LanguageFilesBlank linesComment linesLines of code
PHP44627,59855,28970,903
SVG2501010,400
JSON955007,685
CSS361,7994437,567
JavaScript2061,7182,1517,070
Sass14569902,885
Markdown222053
HTML10013

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 225)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity24.60
▷ Minimum class complexity1.00
▷ Maximum class complexity343.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity225.00
Code structure
Namespaces62
Interfaces7
Traits21
Classes343
▷ Abstract classes154.37%
▷ Concrete classes32895.63%
▷ Final classes9729.57%
Methods3,478
▷ Static methods1,05030.19%
▷ Public methods2,84181.68%
▷ Protected methods3098.88%
▷ Private methods3289.43%
Functions232
▷ Named functions8637.07%
▷ Anonymous functions14662.93%
Constants236
▷ Global constants4920.76%
▷ Class constants18779.24%
▷ Public constants187100.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
37 PNG files occupy 0.23MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/vcard/vcard_32.png1.52KB1.54KB0.00%
assets/vendor/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/dist/images/search.png0.31KB0.27KB▼ 14.20%
assets/images/icon-256x256.png62.01KB22.76KB▼ 63.30%
assets/images/ui-icons_999999_256x240.png4.27KB4.11KB▼ 3.78%