84% pta-member-directory

Code Review | Member Directory and Contact Form

WordPress plugin Member Directory and Contact Form scored 84% from 54 tests.

About plugin

  • Plugin page: pta-member-directory
  • Plugin version: 1.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8.0
  • WordPress version: 5.8.1
  • First release: Jul 26, 2013
  • Latest release: Sep 7, 2021
  • Number of updates: 81
  • Update frequency: every 36.6 days
  • Top authors: DBAR Productions (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

700+ active / 36,686 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.40MB] [CPU: ▼142.88ms] Passed 4 tests

Analyzing server-side resources used by Member Directory and Contact Form
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.22 ▲0.5041.96 ▲14.60
Dashboard /wp-admin3.44 ▲0.3948.04 ▼6.31
Posts /wp-admin/edit.php3.56 ▲0.4556.28 ▲9.96
Add New Post /wp-admin/post-new.php5.80 ▲0.37100.07 ▼587.90
Media Library /wp-admin/upload.php3.38 ▲0.3846.74 ▲12.75
Positions /wp-admin/edit-tags.php?taxonomy=member_category&post_type=member3.3836.17
Sort Positions /wp-admin/edit.php?post_type=member&page=pta_member_sort3.4535.40
All Members /wp-admin/edit.php?post_type=member3.5140.83
Options /wp-admin/edit.php?post_type=member&page=pta_member_settings3.4531.52
New Member /wp-admin/post-new.php?post_type=member3.5758.07

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 2 new options
New WordPress options
pta_member_directory_version
pta_directory_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Member Directory and Contact Form
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,739 ▲16716.32 ▲0.7411.80 ▲3.4050.84 ▼0.60
Dashboard /wp-admin3,017 ▲865.93 ▼0.00144.39 ▼13.35149.69 ▲32.00
Posts /wp-admin/edit.php2,808 ▲692.73 ▼0.1171.04 ▼3.0896.90 ▼8.00
Add New Post /wp-admin/post-new.php1,718 ▲3518.70 ▲0.04405.50 ▲9.08118.56 ▲2.17
Media Library /wp-admin/upload.php1,805 ▼24.98 ▼0.04139.71 ▼27.41150.57 ▲19.12
Positions /wp-admin/edit-tags.php?taxonomy=member_category&post_type=member1,7802.3760.4992.75
Sort Positions /wp-admin/edit.php?post_type=member&page=pta_member_sort1,5422.3658.7878.66
All Members /wp-admin/edit.php?post_type=member1,9742.5661.0086.18
Options /wp-admin/edit.php?post_type=member&page=pta_member_settings2,6113.1276.21121.01
New Member /wp-admin/post-new.php?post_type=member3,6099.08234.28164.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • pta_member_directory_version

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pta-member-directory/output-filters.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pta-member-directory/includes/pta-display-directory.php:869
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/pta-member-directory/pta-member-directory.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pta-member-directory/includes/process-ajax.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: Please take inspiration from this readme.txt

pta-member-directory/pta-member-directory.php Passed 13 tests

The main PHP script in "Member Directory and Contact Form" version 1.7.0 is automatically included on every request by WordPress
110 characters long description:
Member/Staff directory listing and management system with contact form. Uses custom post type and taxonomies.

Code Analysis Passed 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 plugin4,570 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PO File25265362,435
PHP71703442,104
JavaScript21723
CSS2108

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
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%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/users_16.png0.79KB0.74KB▼ 6.45%
images/users_32.png1.65KB1.44KB▼ 12.88%