69% netforum-directory-with-importer

Code Review | Netforum Member Directory

WordPress plugin Netforum Member Directory scored 69% from 54 tests.

About plugin

  • Plugin page: netforum-director...
  • Plugin version: 1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9
  • WordPress version: 6.3.1
  • First release: Aug 14, 2014
  • Latest release: Mar 21, 2022
  • Number of updates: 67
  • Update frequency: every 41.4 days
  • Top authors: gkher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,615 total downloads

Benchmarks

Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲4.68MB] [CPU: ▲22.43ms] 75% from 4 tests

An overview of server-side resources used by Netforum Member Directory
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,526.36ms on /wp-admin/tools.php?page=fs_netforum_plugin_import)
PageMemory (MB)CPU Time (ms)
Home /8.55 ▲5.0966.00 ▲21.38
Dashboard /wp-admin8.57 ▲5.2680.93 ▲30.78
Posts /wp-admin/edit.php8.57 ▲5.2165.60 ▲20.94
Add New Post /wp-admin/post-new.php9.03 ▲3.14106.32 ▲16.62
Media Library /wp-admin/upload.php8.57 ▲5.3466.41 ▲33.92
Netforum Directory /wp-admin/tools.php?page=fs_netforum_plugin_import8.571,526.36
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5753.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 194 new files
Database: 1 new table, 11 new options
New tables
wp_fsnet_user_master
New WordPress options
fs_accounts
widget_recent-posts
fs_gdpr
widget_theysaidso_widget
widget_recent-comments
fs_active_plugins
fs_debug_mode
db_upgraded
theysaidso_admin_options
fsnet_db_version_sync
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Netforum Member Directory
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.20 ▼1.181.88 ▼0.0632.07 ▼18.20
Dashboard /wp-admin2,231 ▲435.80 ▲0.96112.26 ▼3.5046.39 ▼0.17
Posts /wp-admin/edit.php2,114 ▲252.02 ▲0.0234.37 ▼2.7734.84 ▲0.58
Add New Post /wp-admin/post-new.php1,534 ▲1518.11 ▼5.08622.64 ▼30.0658.37 ▲9.85
Media Library /wp-admin/upload.php1,413 ▲224.22 ▲0.06102.06 ▲5.7546.15 ▲1.67
Netforum Directory /wp-admin/tools.php?page=fs_netforum_plugin_import1,3102.0630.9251.31
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0601.7126.9128.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/netforum-directory-with-importer/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie tables were found after uninstall: 1 table
    • wp_fsnet_user_master
  • The uninstall procedure has failed, leaving 11 options in the database
    • db_upgraded
    • fs_gdpr
    • fs_active_plugins
    • fs_accounts
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • fs_debug_mode
    • fsnet_db_version_sync
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: avectra, netforum, member directory

netforum-directory-with-importer/plugin.php 92% from 13 tests

The main PHP file in "Netforum Member Directory" ver. 1.11 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("netforum-directory-with-importer.php" instead of "plugin.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin52,529 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PHP1077,26716,06630,616
PO File126,9518,44415,222
JavaScript51,9907,0216,388
Markdown1680214
CSS139061
JSON10027
SVG1001

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity89.26
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods1,144
▷ Static methods17315.12%
▷ Public methods80170.02%
▷ Protected methods151.31%
▷ Private methods32828.67%
Functions95
▷ Named functions95100.00%
▷ Anonymous functions00.00%
Constants123
▷ Global constants9879.67%
▷ Class constants2520.33%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/forward_disabled.png1.33KB0.58KB▼ 56.42%
images/sort_both.png1.11KB0.29KB▼ 74.12%
images/forward_enabled_hover.png1.35KB0.58KB▼ 56.93%
images/sort_asc_disabled.png2.85KB0.25KB▼ 91.36%
images/sort_desc.png1.10KB0.25KB▼ 77.73%