72% wplingo

Code Review | WPLingo - Forum Plugin

WordPress plugin WPLingo - Forum Plugin scored 72% from 54 tests.

About plugin

  • Plugin page: wplingo
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Dec 29, 2016
  • Latest release: Mar 7, 2017
  • Number of updates: 19
  • Update frequency: every 3.6 days
  • Top authors: XinguPL (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.15MB] [CPU: ▼21.11ms] Passed 4 tests

Analyzing server-side resources used by WPLingo - Forum Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6244.59 ▲0.13
Dashboard /wp-admin3.78 ▲0.4835.64 ▼11.54
Posts /wp-admin/edit.php3.86 ▲0.5138.72 ▼10.40
Add New Post /wp-admin/post-new.php3.76 ▼2.1339.43 ▼60.49
Media Library /wp-admin/upload.php3.79 ▲0.5631.98 ▼2.01
Topic Tags /wp-admin/edit-tags.php?taxonomy=lingo_topic_tag&post_type=lingo_topic3.7831.56
Options /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic&page=lingo-extensions3.7130.99
E-mail Templates /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic&page=lingo-email-templates3.7129.47
Forum /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic3.7832.46

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 58 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
lingo_forum_group_children
widget_theysaidso_widget
lingo_config
lingo_first_run
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WPLingo - Forum Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,003 ▲26813.94 ▼0.6511.71 ▲9.7642.67 ▼7.62
Dashboard /wp-admin2,258 ▲704.87 ▼0.01112.75 ▲12.6241.76 ▼3.36
Posts /wp-admin/edit.php2,138 ▲492.05 ▲0.0738.67 ▼4.2232.45 ▼2.42
Add New Post /wp-admin/post-new.php1,558 ▲3023.14 ▲4.76682.95 ▲83.0464.53 ▲9.38
Media Library /wp-admin/upload.php1,437 ▲494.32 ▲0.0493.94 ▼1.5039.88 ▼2.83
Topic Tags /wp-admin/edit-tags.php?taxonomy=lingo_topic_tag&post_type=lingo_topic1,2802.1627.7629.31
Options /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic&page=lingo-extensions280.440.093.50
E-mail Templates /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic&page=lingo-email-templates280.440.073.51
Forum /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic1,5772.2028.6035.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_recent-comments
    • lingo_config
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • lingo_forum_group_children
    • db_upgraded
    • widget_recent-posts
    • lingo_first_run

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic
    • > Notice in wp-content/plugins/wplingo/includes/admin-topic.php+437
    Undefined index: parent_id

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
  • 41× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lingo_config() in wp-content/plugins/wplingo/templates/topic-single.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function lingo_config() in wp-content/plugins/wplingo/templates/forum-single-actions.php:5
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/wplingo/templates/user-page.php on line 1
    • > PHP Notice
      Undefined variable: module_groups in wp-content/plugins/wplingo/admin/options.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wplingo/templates/user-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wplingo/templates/post-single.php:1
    • > PHP Notice
      Undefined variable: forumStatus in wp-content/plugins/wplingo/templates/topic-single-reply.php on line 1
    • > PHP Notice
      Undefined variable: forumStatus in wp-content/plugins/wplingo/templates/topic-single-actions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Lingo' not found in wp-content/plugins/wplingo/templates/topic-single-reply.php:4
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/wplingo/templates/forum-item.php on line 1

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
    • > GET request to /wp-admin/edit-tags.php?taxonomy=lingo_topic_tag&post_type=lingo_topic
    • > Javascript (severe) in unknown
    /wp-admin/edit-tags.php?taxonomy=lingo_topic_tag&post_type=lingo_topic 48:4 Uncaught SyntaxError: Unexpected token '
    • > GET request to /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic&page=lingo-extensions
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic&page=lingo-extensions - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic&page=lingo-email-templates
    • > Network (severe)
    wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic&page=lingo-email-templates - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic
    • > Javascript (severe) in unknown
    /wp-admin/edit-tags.php?taxonomy=lingo_forum_group&post_type=lingo_topic 48:4 Uncaught SyntaxError: Unexpected token '

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

wplingo/wplingo.php 92% from 13 tests

The main PHP script in "WPLingo - Forum Plugin" version 1.1.2 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin9,232 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP421,0281,4474,482
CSS4182793,606
SVG100685
JavaScript214935459

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.60
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods32
▷ Static methods412.50%
▷ Public methods2887.50%
▷ Protected methods412.50%
▷ Private methods00.00%
Functions110
▷ Named functions110100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin