10% wp-forum-extention

Code Review | WP Forum

WordPress plugin WP Forum scored10%from 54 tests.

About plugin

  • Plugin page: wp-forum-extention
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Jul 11, 2016
  • Number of updates: 21
  • Update frequency: every 0.7 days
  • Top authors: charly23 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,126 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-forum-extention/register.php+8
    Only variables should be passed by reference

Server metrics [RAM: ▼1.93MB] [CPU: ▼55.96ms] Passed 4 tests

This is a short check of server-side resources used by WP Forum
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.21 ▼37.43
Dashboard /wp-admin2.08 ▼1.226.43 ▼45.88
Posts /wp-admin/edit.php2.08 ▼1.286.83 ▼44.59
Add New Post /wp-admin/post-new.php2.08 ▼3.818.19 ▼95.95
Media Library /wp-admin/upload.php2.08 ▼1.156.10 ▼28.14
Settings /wp-admin/admin.php?page=settings_wp_forum2.085.16
WP Forum /wp-admin/admin.php?page=wp_forum2.085.35

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 57 new files
Database: 1 new table, 6 new options
New tables
wp_wpforum_profile
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Forum
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,095 ▲33415.81 ▲1.198.46 ▲6.8242.35 ▼2.42
Dashboard /wp-admin2,371 ▲1946.55 ▲0.85115.24 ▲19.6081.32 ▲43.90
Posts /wp-admin/edit.php2,296 ▲1963.66 ▲1.6754.01 ▲13.0575.47 ▲38.69
Add New Post /wp-admin/post-new.php1,711 ▲18522.29 ▼0.85635.08 ▼46.2835.88 ▼15.01
Media Library /wp-admin/upload.php1,436 ▲394.40 ▲0.1483.31 ▼26.1482.82 ▲38.89
Settings /wp-admin/admin.php?page=settings_wp_forum1,0503.3340.8558.97
WP Forum /wp-admin/admin.php?page=wp_forum1,3173.4744.9358.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-forum-extention/register.php+8
    Only variables should be passed by reference
  • Zombie tables were found after uninstall: 1 table
    • wp_wpforum_profile
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Notice in wp-content/plugins/wp-forum-extention/system/load.php+18
    Only variables should be passed by reference
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Deprecated in wp-content/plugins/wp-forum-extention/system/html.php+143
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp_forum-admin-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-sortable handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-draggable handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-droppable handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-core handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-dialog handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-slider handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp_forumadmin-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp_forumsort-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the wp_forumajax_handler handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Deprecated in wp-content/plugins/wp-forum-extention/config/autoload.php+104
    Non-static method add::localize_script() should not be called statically
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Deprecated in wp-content/plugins/wp-forum-extention/controller/action.php+8
    Cannot use "parent" when current class scope has no parent
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings_wp_forum
    • > Notice in wp-content/plugins/wp-forum-extention/view/settings.php+49
    Undefined variable: set_roles
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Notice in wp-content/plugins/wp-forum-extention/view/manage.php+341
    Undefined offset: 0

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'add' not found in wp-content/plugins/wp-forum-extention/config/autoload.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wp-forum-extention/system/error.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-forum-extention/system/add.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'html' not found in wp-content/plugins/wp-forum-extention/view/settings.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'db' not found in wp-content/plugins/wp-forum-extention/model/users.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/wp-forum-extention/view/manage.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'html' not found in wp-content/plugins/wp-forum-extention/view/add.php:8
    • > PHP Notice
      Only variables should be passed by reference in wp-content/plugins/wp-forum-extention/register.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/wp-forum-extention/view/shortcode/wp-forum-inner.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/wp-forum-extention/view/shortcode/wp-forum-inner.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Network (severe)
    wp-content/plugins/wp-forum/css/admin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Network (severe)
    wp-content/plugins/wp-forum/js/admin.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Network (severe)
    wp-content/plugins/wp-forum/js/sort.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Network (severe)
    wp-content/plugins/wp-forum/js/ajax.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp_forum
    • > Network (severe)
    wp-content/plugins/wp-forum/images/seo_web-10-16.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-forum-extention === )
Please take inspiration from this readme.txt

wp-forum-extention/wp-forum.php 92% from 13 tests

This is the main PHP file of "WP Forum" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-forum-extention.php" instead of "wp-forum.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected5,154 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP291,0402942,433
HTML127752,088
CSS244350
JavaScript44813209
Markdown135074

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity24.72
▷ Minimum class complexity1.00
▷ Maximum class complexity120.00
Average method complexity4.16
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods135
▷ Static methods10275.56%
▷ Public methods13499.26%
▷ Protected methods00.00%
▷ Private methods10.74%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/free-22-16.png0.37KB0.37KB0.00%
images/BT_search-16.png0.38KB0.39KB0.00%
images/cog-16.png0.62KB0.64KB0.00%
images/seo_web-10-16.png0.72KB0.78KB0.00%
images/application-x-desktop.png0.70KB0.73KB0.00%