10% widgetpack-comment-system

Code Review | WidgetPack Comment System

WordPress plugin WidgetPack Comment System scored 10% from 54 tests.

About plugin

  • Plugin page: widgetpack-commen...
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.7
  • WordPress version: 6.3.1
  • First release: Mar 24, 2016
  • Latest release: May 10, 2017
  • Number of updates: 33
  • Update frequency: every 12.5 days
  • Top authors: widgetpack (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

90+ active / 6,196 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/widgetpack-comment-system/api/wpcmt-api.php+17
    Methods with the same name as their class will not be constructors in a future version of PHP; WPacCommentAPI has a deprecated constructor

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.05ms] Passed 4 tests

A check of server-side resources used by WidgetPack Comment System
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.73 ▼4.81
Dashboard /wp-admin3.32 ▲0.0251.08 ▲1.77
Posts /wp-admin/edit.php3.37 ▲0.0247.84 ▼3.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0293.21 ▼14.81
Media Library /wp-admin/upload.php3.24 ▲0.0233.86 ▼1.19
All Comments /wp-admin/edit-comments.php3.2636.73
WidgetPack /wp-admin/edit-comments.php?page=wpcmt3.3550.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-posts
wpcmt_version
theysaidso_admin_options
can_compress_scripts
wpcmt_active
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

WidgetPack Comment System: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲6013.32 ▼1.044.24 ▲2.1946.37 ▼0.79
Dashboard /wp-admin2,226 ▲385.84 ▼0.06104.18 ▼16.3443.82 ▼5.10
Posts /wp-admin/edit.php2,106 ▲172.05 ▼0.0135.77 ▼4.5833.91 ▼4.78
Add New Post /wp-admin/post-new.php1,548 ▲3423.22 ▲5.68696.79 ▲20.1357.16 ▼1.89
Media Library /wp-admin/upload.php1,402 ▲144.20 ▲0.03100.41 ▼17.6448.70 ▼6.93
All Comments /wp-admin/edit-comments.php1,8062.2834.2633.81
WidgetPack /wp-admin/edit-comments.php?page=wpcmt1,2141.8330.75114.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wpcmt_active
    • wpcmt_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 12× PHP files trigger errors when accessed directly with GET requests (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/widgetpack-comment-system/wpcmt-manage.php on line 8
    • > PHP Warning
      require_once(ABSPATHWPINC/http.php): failed to open stream: No such file or directory in wp-content/plugins/widgetpack-comment-system/api/wpcmt-wp-api.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/widgetpack-comment-system/wpcmt-comments.php:2
    • > PHP Warning
      require_once(ABSPATHWPINC/http.php): failed to open stream: No such file or directory in wp-content/plugins/widgetpack-comment-system/api/wpcmt-wp-api.php on line 2
    • > PHP Warning
      require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in wp-content/plugins/widgetpack-comment-system/wpcmt-manage.php on line 8
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/widgetpack-comment-system/api/wpcmt-wp-api.php on line 2
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-includes/version.php' (include_path='.:/usr/share/php') in wp-content/plugins/widgetpack-comment-system/wpcmt-manage.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/http.php' (include_path='.:/usr/share/php') in wp-content/plugins/widgetpack-comment-system/api/wpcmt-wp-api.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHWPINC/http.php' (include_path='.:/usr/share/php') in wp-content/plugins/widgetpack-comment-system/api/wpcmt-wp-api.php on line 2
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/widgetpack-comment-system/api/wpcmt-wp-api.php on line 2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/edit-comments.php?page=wpcmt
    • > Network (severe)
    https://embed.widgetpack.com/widget.js - Failed to load resource: net::ERR_NAME_NOT_RESOLVED
    • > GET request to /wp-admin/edit-comments.php?page=wpcmt
    • > Javascript (severe) in unknown
    /wp-content/plugins/widgetpack-comment-system/static/js/bootstrap.min.js?ver=6.3.1 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 46 tag instead of maximum 10
The official readme.txt might help

widgetpack-comment-system/wpcmt.php 85% from 13 tests

The main PHP script in "WidgetPack Comment System" version 1.6.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("widgetpack-comment-system.php" instead of "wpcmt.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 148 characters long)

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
Success! There were no dangerous files found in this plugin2,467 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP81921761,840
CSS38421456
JavaScript2822171

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity33.33
▷ Minimum class complexity2.00
▷ Maximum class complexity84.00
Average method complexity7.47
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions51
▷ Named functions51100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin