67% name-directory

Code Review | Name Directory

WordPress plugin Name Directory scored67%from 54 tests.

About plugin

  • Plugin page: name-directory
  • Plugin version: 1.28.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4
  • WordPress version: 6.3.1
  • First release: Nov 8, 2013
  • Latest release: Nov 5, 2023
  • Number of updates: 201
  • Update frequency: every 18.2 days
  • Top authors: jeroenpeters1986 (100%)

Code review

54 tests

User reviews

76 reviews

Install metrics

3,000+ active /121,098 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼1.43ms] Passed 4 tests

A check of server-side resources used by Name Directory
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1441.67 ▼2.89
Dashboard /wp-admin3.73 ▲0.4247.07 ▼2.93
Posts /wp-admin/edit.php3.84 ▲0.4849.48 ▲2.40
Add New Post /wp-admin/post-new.php6.33 ▲0.4483.11 ▼2.28
Media Library /wp-admin/upload.php3.65 ▲0.4239.37 ▲6.38
Quick import /wp-admin/admin.php?page=name-directory&sub=quick-import3.6234.15
Add directory /wp-admin/admin.php?page=name-directory&sub=new-directory3.6231.30
General settings /wp-admin/admin.php?page=name-directory-general-settings3.6231.42
Name Directory /wp-admin/admin.php?page=name-directory3.6235.77

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 2 new tables, 7 new options
New tables
wp_name_directory
wp_name_directory_name
New WordPress options
name_directory_db_version
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Name Directory
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7214.72 ▲0.491.73 ▲0.1543.96 ▼1.58
Dashboard /wp-admin2,234 ▲625.59 ▼0.1091.02 ▼13.9138.60 ▼5.49
Posts /wp-admin/edit.php2,142 ▲422.00 ▲0.0436.24 ▼1.8333.87 ▲0.35
Add New Post /wp-admin/post-new.php1,561 ▲3523.49 ▲0.41680.09 ▼21.2857.81 ▲0.92
Media Library /wp-admin/upload.php1,442 ▲424.24 ▲0.05100.08 ▼10.1943.34 ▼4.89
Quick import /wp-admin/admin.php?page=name-directory&sub=quick-import8432.1825.1727.03
Add directory /wp-admin/admin.php?page=name-directory&sub=new-directory1,4241.6924.5139.88
General settings /wp-admin/admin.php?page=name-directory-general-settings1,0872.0532.5044.34
Name Directory /wp-admin/admin.php?page=name-directory9402.0225.6724.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_name_directory_name
    • wp_name_directory
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • name_directory_db_version
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/name-directory/database.php
    • > /wp-content/plugins/name-directory/index.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/name-directory/admin_general_settings.php:352
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/name-directory/shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/name-directory/admin.php:3

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 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Plugin Name: Please specify the plugin name on the first line ( === name-directory === )
Please take inspiration from this readme.txt

name-directory/index.php 85% from 13 tests

Analyzing the main PHP file in "Name Directory" version 1.28.5
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/translation" does not exist
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("name-directory.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected2,760 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP64323102,463
CSS22913155
JavaScript13121142

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.37
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions48
▷ Named functions4797.92%
▷ Anonymous functions12.08%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin