68% nonprofit-board-management

Code Review | Nonprofit Board Management

WordPress plugin Nonprofit Board Management scored 68% from 54 tests.

About plugin

  • Plugin page: nonprofit-board-m...
  • Plugin version: 1.1.19
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1
  • WordPress version: 6.3.1
  • First release: Jun 24, 2013
  • Latest release: Nov 9, 2022
  • Number of updates: 68
  • Update frequency: every 50.4 days
  • Top authors: wiredimpact (75%)danielpw (20.59%)JG Visual (7.35%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active / 19,573 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.50MB] [CPU: ▲2.36ms] Passed 4 tests

Analyzing server-side resources used by Nonprofit Board Management
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4451.63 ▲7.40
Dashboard /wp-admin3.87 ▲0.5653.19 ▲3.55
Posts /wp-admin/edit.php3.92 ▲0.5651.08 ▲3.38
Add New Post /wp-admin/post-new.php6.40 ▲0.5196.44 ▼4.91
Media Library /wp-admin/upload.php3.72 ▲0.4944.03 ▲9.73
Board Resources /wp-admin/admin.php?page=nonprofit-board/resources3.6834.92
Board Committees /wp-admin/edit.php?post_type=board_committees3.8241.27
Board Members /wp-admin/admin.php?page=nonprofit-board3.6833.08
Board Events /wp-admin/edit.php?post_type=board_events3.8338.43
Add Board Event /wp-admin/post-new.php?post_type=board_events3.7545.52
Edit Your Board Resources /wp-admin/options.php?page=nonprofit-board/resources/edit3.7948.06
Add Board Committee /wp-admin/post-new.php?post_type=board_committees3.7546.07
Support /wp-admin/admin.php?page=nonprofit-board/support3.6834.40

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: 1 new table, 7 new options
New tables
wp_board_rsvps
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
board_rsvp_db_version
widget_recent-posts

Browser metrics 50% from 4 tests

Nonprofit Board Management: an overview of browser usage
Having an awesome user experience is important, so please improve the following
  • Memory: You must limit browser memory usage to 75.00MB (currently 81.53MB on /wp-admin/admin.php?page=nonprofit-board/support)
  • Script duration: Total JavaScript execution time should be lower than 1,500.00ms (currently 2,046.31ms on /wp-admin/admin.php?page=nonprofit-board/support)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲28313.57 ▼0.741.84 ▼0.1545.22 ▼1.43
Dashboard /wp-admin2,421 ▲2305.22 ▲0.36100.88 ▼4.0540.96 ▲0.61
Posts /wp-admin/edit.php2,211 ▲1222.34 ▲0.2939.71 ▼0.3733.80 ▼1.26
Add New Post /wp-admin/post-new.php1,574 ▲3718.42 ▲0.25652.08 ▼2.7062.52 ▲5.13
Media Library /wp-admin/upload.php1,506 ▲1214.47 ▲0.22105.03 ▲4.9646.34 ▲2.09
Board Resources /wp-admin/admin.php?page=nonprofit-board/resources9591.9530.1128.62
Board Committees /wp-admin/edit.php?post_type=board_committees1,1782.2932.3430.26
Board Members /wp-admin/admin.php?page=nonprofit-board9861.8927.3827.72
Board Events /wp-admin/edit.php?post_type=board_events1,2182.3134.1430.63
Add Board Event /wp-admin/post-new.php?post_type=board_events1,6182.8252.4852.85
Edit Your Board Resources /wp-admin/options.php?page=nonprofit-board/resources/edit1,5576.35114.2850.71
Add Board Committee /wp-admin/post-new.php?post_type=board_committees1,5852.7950.8845.38
Support /wp-admin/admin.php?page=nonprofit-board/support6,67681.532,046.3130.79

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
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_board_rsvps
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • board_rsvp_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/nonprofit-board-management/templates/list-board-members.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/nonprofit-board-management/templates/list-board-members.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/nonprofit-board-management/nonprofit-board-management.php:1070
    • > PHP Notice
      Undefined variable: board_members in wp-content/plugins/nonprofit-board-management/templates/list-board-members.php on line 20

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: board governance, boards, non-profits, directors, 501c3...

nonprofit-board-management/nonprofit-board-management.php Passed 13 tests

The main PHP file in "Nonprofit Board Management" ver. 1.1.19 adds more information about the plugin and also serves as the entry point for this plugin
54 characters long description:
A simple, free way to manage your nonprofit’s board.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin3,895 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP45298541,761
JavaScript22142841,599
CSS25680535

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity79.33
▷ Minimum class complexity57.00
▷ Maximum class complexity116.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods94
▷ Static methods11.06%
▷ Public methods7781.91%
▷ Protected methods00.00%
▷ Private methods1718.09%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/nonprofit-board-gavel.png2.27KB1.56KB▼ 31.05%
css/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
css/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
css/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%