61% wpforo

Code Review | wpForo Forum

WordPress plugin wpForo Forum scored61%from 54 tests.

About plugin

  • Plugin page: wpforo
  • Plugin version: 2.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.4
  • WordPress version: 6.3.1
  • First release: Jun 26, 2016
  • Latest release: Nov 29, 2023
  • Number of updates: 466
  • Update frequency: every 5.8 days
  • Top authors: Tomdever (100%)

Code review

54 tests

User reviews

362 reviews

Install metrics

20,000+ active /1,131,998 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲12.03MB] [CPU: ▲76.87ms] 50% from 4 tests

This is a short check of server-side resources used by wpForo Forum
The following require your attention
  • RAM: Try to keep total memory usage under 10MB (currently 15.77MB on /wp-admin/admin.php?page=wpforo-phrases)
  • Extra RAM: The extra memory usage should kept under 5MB (currently 12.03MB on /wp-admin/admin.php?page=wpforo-phrases)
PageMemory (MB)CPU Time (ms)
Home /15.02 ▲11.56115.03 ▲73.17
Dashboard /wp-admin15.46 ▲12.16137.18 ▲89.81
Posts /wp-admin/edit.php15.58 ▲12.22138.13 ▲91.55
Add New Post /wp-admin/post-new.php18.07 ▲12.18160.33 ▲61.02
Media Library /wp-admin/upload.php15.50 ▲12.27116.71 ▲83.47
Accesses /wp-admin/admin.php?page=wpforo-accesses15.72124.50
Forums /wp-admin/admin.php?page=wpforo-forums15.76141.33
Moderation /wp-admin/admin.php?page=wpforo-moderations15.78128.53
Usergroups /wp-admin/admin.php?page=wpforo-usergroups15.82129.49
Boards /wp-admin/admin.php?page=wpforo-boards15.75118.79
Settings /wp-admin/admin.php?page=wpforo-settings15.75143.40
Members /wp-admin/admin.php?page=wpforo-members15.81138.77
Themes /wp-admin/admin.php?page=wpforo-themes15.72125.64
Addons /wp-admin/admin.php?page=wpforo-addons15.72118.97
Phrases /wp-admin/admin.php?page=wpforo-phrases15.77145.84

Server storage [IO: ▲20.35MB] [DB: ▲0.29MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 455 new files
Database: 19 new tables, 41 new options
New tables
wp_wpforo_bookmarks
wp_wpforo_topics
wp_wpforo_forums
wp_wpforo_boards
wp_wpforo_phrases
wp_wpforo_posts
wp_wpforo_subscribes
wp_wpforo_profiles
wp_wpforo_visits
wp_wpforo_usergroups
...
New WordPress options
wpforo_posting
wpforo_profiles
wpforo_social
wpforo_topics
wpforo_buddypress
wpforo_members
wpforo_um
widget_wpforo_recent_posts
wpforo_addon_note_dismissed
wpforo_version_db
...

Browser metrics Passed 4 tests

Checking browser requirements for wpForo Forum
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,018 ▲24514.69 ▼0.101.85 ▼0.1841.44 ▼1.69
Dashboard /wp-admin2,348 ▲1745.63 ▼0.0993.31 ▼13.4339.41 ▼5.62
Posts /wp-admin/edit.php2,251 ▲1542.03 ▲0.0842.74 ▲4.9236.81 ▲2.03
Add New Post /wp-admin/post-new.php1,656 ▲13022.09 ▼0.91638.90 ▼12.4042.93 ▼18.63
Media Library /wp-admin/upload.php1,545 ▲1424.17 ▼0.0797.89 ▼1.0843.15 ▲1.34
Accesses /wp-admin/admin.php?page=wpforo-accesses1,1362.3935.8748.36
Forums /wp-admin/admin.php?page=wpforo-forums1,3803.8874.5262.28
Moderation /wp-admin/admin.php?page=wpforo-moderations1,3912.4034.5930.76
Usergroups /wp-admin/admin.php?page=wpforo-usergroups1,6752.3932.6749.69
Boards /wp-admin/admin.php?page=wpforo-boards1,0932.4130.0627.44
Settings /wp-admin/admin.php?page=wpforo-settings2,0052.4134.2633.53
Members /wp-admin/admin.php?page=wpforo-members1,6752.4033.7035.35
Themes /wp-admin/admin.php?page=wpforo-themes1,2132.3629.7030.37
Addons /wp-admin/admin.php?page=wpforo-addons2,4533.0252.0687.83
Phrases /wp-admin/admin.php?page=wpforo-phrases1,6792.3933.9837.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 19 tables in the database
    • wp_wpforo_reactions
    • wp_wpforo_posts
    • wp_wpforo_subscribes
    • wp_wpforo_follows
    • wp_wpforo_postmeta
    • wp_wpforo_boards
    • wp_wpforo_activity
    • wp_wpforo_usergroups
    • wp_wpforo_profiles
    • wp_wpforo_visits
    • ...
  • The uninstall procedure has failed, leaving 41 options in the database
    • wpforo_seo
    • wpforo_components
    • wpforo_buddypress
    • wpforo_recaptcha
    • wpforo_pageid
    • wpforo_um
    • wpforo_version
    • widget_wpforo_forums
    • wpforo_logging
    • wpforo_notifications
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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 following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wpforo/admin/pages/tools.php
    • > /wp-content/plugins/wpforo/admin/tools-tabs/cleanup.php
    • > /wp-content/plugins/wpforo/languages/index.php
  • 30× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpforo/admin/listtables/Boards.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpforo/admin/listtables/Moderations.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpforo/admin/listtables/Phrases.php on line 7
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpforo/autoload.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wpforo/widgets/RecentTopics.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPF() in wp-content/plugins/wpforo/themes/classic/topic.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/wpforo/admin/listtables/Members.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpforo/admin/listtables/Moderations.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPF() in wp-content/plugins/wpforo/themes/2022/topic.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wpforo/widgets/OnlineMembers.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=wpforo-forums
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28609 "jQuery.Deferred exception: menus is not defined" "ReferenceError: menus is not defined\n at Object.init (/wp-admin/js/nav-menu.min.js?ver=6.3.1:2:809)\n at HTMLDocument.\u003Canonymous> (/wp-admin/js/nav-menu.min.js?ver=6.3.1:2:25277)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=wpforo-forums
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1:28721 Uncaught ReferenceError: menus is not defined

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Requires php: Invalid version format
The official readme.txt is a good inspiration

wpforo/wpforo.php Passed 13 tests

"wpForo Forum" version 2.2.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
125 characters long description:
WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected186,059 lines of code in 254 files:
LanguageFilesBlank linesComment linesLines of code
PO File3254,44561,278117,374
PHP1855,8204,19850,872
CSS1886167610,923
JavaScript155062025,720
XML100968
HTML2220101
XSLT100101

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 137)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity106.54
▷ Minimum class complexity1.00
▷ Maximum class complexity557.00
Average method complexity5.16
▷ Minimum method complexity1.00
▷ Maximum method complexity137.00
Code structure
Namespaces17
Interfaces0
Traits0
Classes54
▷ Abstract classes00.00%
▷ Concrete classes54100.00%
▷ Final classes11.85%
Methods1,304
▷ Static methods50.38%
▷ Public methods1,11885.74%
▷ Protected methods00.00%
▷ Private methods18614.26%
Functions700
▷ Named functions44163.00%
▷ Anonymous functions25937.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
98 PNG files occupy 2.90MB with 0.89MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/dashboard/cog.png0.22KB0.16KB▼ 26.43%
assets/images/sn/msn.png0.66KB0.66KB0.00%
assets/images/sn/twitter.png1.59KB0.60KB▼ 62.35%
assets/images/sn/aim.png0.13KB0.14KB0.00%
assets/images/sn/ok-m.png3.42KB1.22KB▼ 64.32%