68% wordpress-member-private-conversation

Code Review | Nmedia Wordpress Member Conversation

WordPress plugin Nmedia Wordpress Member Conversation scored68%from 54 tests.

About plugin

  • Plugin page: wordpress-member-...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Mar 6, 2012
  • Latest release: Mar 14, 2021
  • Number of updates: 50
  • Update frequency: every 65.9 days
  • Top authors: nmedia (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10+ active /4,456 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.19MB] [CPU: ▲1.00ms] Passed 4 tests

A check of server-side resources used by Nmedia Wordpress Member Conversation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1745.13 ▲5.64
Dashboard /wp-admin3.50 ▲0.2054.36 ▲3.37
Posts /wp-admin/edit.php3.62 ▲0.2652.54 ▼0.71
Add New Post /wp-admin/post-new.php6.08 ▲0.2086.01 ▼3.48
Media Library /wp-admin/upload.php3.43 ▲0.2042.39 ▲4.83
Convo List /wp-admin/admin.php?page=nmconvo-list3.4135.47
WP Convo /wp-admin/admin.php?page=nmconvo3.4437.58

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 108 new files
Database: 1 new table, 7 new options
New tables
wp_nm_convo
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
nmconvo_db_version
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Nmedia Wordpress Member Conversation: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.31 ▲0.022.20 ▲0.6143.34 ▲1.21
Dashboard /wp-admin2,206 ▲295.52 ▼0.1290.45 ▼13.3679.82 ▲34.18
Posts /wp-admin/edit.php2,126 ▲261.98 ▼0.0640.85 ▲3.8738.74 ▲2.39
Add New Post /wp-admin/post-new.php1,563 ▲3522.98 ▼0.03664.10 ▲17.32162.52 ▲112.42
Media Library /wp-admin/upload.php1,426 ▲234.25 ▲0.03114.94 ▲9.5976.31 ▲28.52
Convo List /wp-admin/admin.php?page=nmconvo-list8861.8324.0228.05
WP Convo /wp-admin/admin.php?page=nmconvo9502.0033.0846.30

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_nm_convo
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • nmconvo_db_version
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/wordpress-member-private-conversation/templates/admin/all-convos.php
    • > /wp-content/plugins/wordpress-member-private-conversation/inc/admin.php
    • > /wp-content/plugins/wordpress-member-private-conversation/inc/helpers.php
    • > /wp-content/plugins/wordpress-member-private-conversation/templates/file-attachment-new.php
    • > /wp-content/plugins/wordpress-member-private-conversation/templates/user-convos-list.php
    • > /wp-content/plugins/wordpress-member-private-conversation/templates/admin/single-convo.php
    • > /wp-content/plugins/wordpress-member-private-conversation/templates/admin/options.php
    • > /wp-content/plugins/wordpress-member-private-conversation/templates/file-attachment-reply.php
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: cid in wp-content/plugins/wordpress-member-private-conversation/templates/admin/load-convo-detail-admin.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wordpress-member-private-conversation/nm-wp-member-convo.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NMCONVO() in wp-content/plugins/wordpress-member-private-conversation/templates/admin/load-convo-detail-admin.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-member-private-conversation/classes/class.convo.php:1184
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NMCONVO() in wp-content/plugins/wordpress-member-private-conversation/templates/modal/user-modal.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function NMCONVO() in wp-content/plugins/wordpress-member-private-conversation/templates/_template_convo.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/wordpress-member-private-conversation/templates/convo-detail.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
6 plugin tags: wp internal messages system, wp conversation, member private messaging, user conversation system, private conversation...

wordpress-member-private-conversation/nm-wp-member-convo.php 92% from 13 tests

The entry point to "Nmedia Wordpress Member Conversation" version 2.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wordpress-member-private-conversation.php" instead of "nm-wp-member-convo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,265 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript151,4691,4496,730
PHP156842501,547
CSS7127204823
PO File162153132
XML41033

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity93.00
▷ Minimum class complexity93.00
▷ Maximum class complexity93.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants3
▷ Global constants3100.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
56 compressed PNG files occupy 0.12MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/images/sort_desc_disabled.png0.14KB0.25KB0.00%
templates/default/images/icon_s01.png0.20KB0.13KB▼ 33.17%
js/ui/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png0.09KB0.14KB0.00%
js/images/sort_asc_disabled.png0.14KB0.25KB0.00%
templates/default/images/icon_s17.png0.24KB0.17KB▼ 31.33%