79% ai-moderator-for-buddypress-and-buddyboss

Code Review | AI Moderator for BuddyPress

WordPress plugin AI Moderator for BuddyPress scored 79% from 54 tests.

About plugin

  • Plugin page: ai-moderator-for-...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.2
  • WordPress version: 6.3.1
  • First release: May 16, 2023
  • Latest release: May 16, 2023
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: rajinsharwar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 212 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▼3.08ms] Passed 4 tests

A check of server-side resources used by AI Moderator for BuddyPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.05 ▲0.5941.02 ▼0.85
Dashboard /wp-admin3.89 ▲0.5948.78 ▼5.88
Posts /wp-admin/edit.php3.94 ▲0.5950.96 ▲3.05
Add New Post /wp-admin/post-new.php6.41 ▲0.5296.04 ▼8.63
Media Library /wp-admin/upload.php3.65 ▲0.4339.49 ▲5.57
Freemius Debug [v.2.5.7] /wp-admin/admin.php?page=freemius4.0037.55

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 183 new files
Database: no new tables, 9 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by AI Moderator for BuddyPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7714.79 ▲0.491.75 ▼0.0434.00 ▼7.05
Dashboard /wp-admin2,240 ▲615.83 ▼0.0297.31 ▼4.2340.22 ▼7.06
Posts /wp-admin/edit.php2,123 ▲312.02 ▲0.0339.47 ▼0.8541.04 ▲7.14
Add New Post /wp-admin/post-new.php1,532 ▲1817.75 ▲0.22629.10 ▼4.6258.61 ▲6.05
Media Library /wp-admin/upload.php1,425 ▲374.18 ▲0.0794.95 ▼4.6142.42 ▼1.75
Freemius Debug [v.2.5.7] /wp-admin/admin.php?page=freemius1,0811.6924.2928.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/ai-moderator-for-buddypress-and-buddyboss/libs/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 9 options
    • theysaidso_admin_options
    • fs_accounts
    • widget_recent-comments
    • fs_debug_mode
    • widget_recent-posts
    • widget_theysaidso_widget
    • fs_active_plugins
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: Please take inspiration from this readme.txt

ai-moderator-for-buddypress-and-buddyboss/ai-moderator-for-bp.php 92% from 13 tests

"AI Moderator for BuddyPress" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ai-moderator-for-buddypress-and-buddyboss.php" instead of "ai-moderator-for-bp.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin33,377 lines of code in 139 files:
LanguageFilesBlank linesComment linesLines of code

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity93.19
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
▷ Static methods19715.65%
▷ Public methods87069.10%
▷ Protected methods171.35%
▷ Private methods37229.55%
▷ Named functions101100.00%
▷ Anonymous functions00.00%
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libs/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
libs/assets/img/ai-moderator-for-bp-and-bb.png9.16KB5.26KB▼ 42.58%
libs/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%