10% wp-comments-parser

Code Review | WP Comments Parser

WordPress plugin WP Comments Parser scored10%from 54 tests.

About plugin

  • Plugin page: wp-comments-parser
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7+
  • WordPress version: 6.3.1
  • First release: Jan 30, 2018
  • Latest release: Jan 30, 2018
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: hireukraineco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /560 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/wp-comments-parser/Inc/DbClasses/WPPTCCommonDbClass.php+38
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▼1.97MB] [CPU: ▼60.89ms] Passed 4 tests

This is a short check of server-side resources used by WP Comments Parser
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.96 ▼39.34
Dashboard /wp-admin2.05 ▼1.305.77 ▼52.82
Posts /wp-admin/edit.php2.05 ▼1.316.18 ▼46.77
Add New Post /wp-admin/post-new.php2.05 ▼3.846.37 ▼104.62
Media Library /wp-admin/upload.php2.05 ▼1.185.11 ▼31.76

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 113 new files
Database: 1 new table, 7 new options
New tables
wp_wpptc_db_comments
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_wpptcinitwidget
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

WP Comments Parser: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10513.18 ▼1.082.36 ▲0.2438.50 ▼4.66
Dashboard /wp-admin2,239 ▲365.84 ▲0.83101.57 ▼2.7135.84 ▼3.03
Posts /wp-admin/edit.php2,115 ▲152.01 ▲0.0235.30 ▼2.6932.95 ▼4.69
Add New Post /wp-admin/post-new.php1,555 ▲823.23 ▲0.16677.35 ▼9.6554.84 ▲0.27
Media Library /wp-admin/upload.php1,421 ▲214.23 ▲0.02101.56 ▼3.7942.62 ▼1.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/wp-comments-parser/Inc/DbClasses/WPPTCCommonDbClass.php+38
    count(): Parameter must be an array or an object that implements Countable
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_wpptcinitwidget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-comments-parser/Inc/templates/frontend/shortcodeStartwrap.php
    • > /wp-content/plugins/wp-comments-parser/Inc/templates/frontend/shortcodeLoop.php
  • 132× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      require_once(Zend/Uri/Http.php): failed to open stream: No such file or directory in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/Zend/Http/Cookie.php on line 23
    • > PHP Warning
      require_once(Zend/Validate/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/Zend/Validate/Ccnum.php on line 27
    • > PHP Notice
      Undefined variable: self in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/plugins/Scripts/print_source.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Exception.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/Zend/Uri/Exception.php on line 25
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Validate/Hostname/Interface.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/Zend/Validate/Hostname/De.php on line 27
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Validate/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/Zend/Validate/Barcode/UpcA.php on line 27
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Validate/Hostname/Interface.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/Zend/Validate/Hostname/Ch.php on line 27
    • > PHP Warning
      require_once(Zend/Validate/Abstract.php): failed to open stream: No such file or directory in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/Zend/Validate/File/Size.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-comments-parser/Inc/templates/admin/admin_settings.php:1
    • > PHP Fatal error
      require_once(): Failed opening required 'Zend/Validate/Abstract.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-comments-parser/Inc/assets/admin/phpquery/phpQuery/phpQuery/Zend/Validate/Identical.php on line 23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Contributors: Plugin contributors not specified
  • Screenshots: A description for screenshot #1 is required in wp-comments-parser/assets to your readme.txt
The official readme.txt is a good inspiration

wp-comments-parser/index.php 85% from 13 tests

"WP Comments Parser" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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-comments-parser.php" instead of "index.php")
  • Git Repository: Please remove the Git repository from this plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected9,811 lines of code in 109 files:
LanguageFilesBlank linesComment linesLines of code
PHP941,5017,8449,292
XML1070431
PO File116546
JavaScript36425
CSS13017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity21.52
▷ Minimum class complexity1.00
▷ Maximum class complexity555.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces3
Interfaces4
Traits0
Classes85
▷ Abstract classes89.41%
▷ Concrete classes7790.59%
▷ Final classes00.00%
Methods644
▷ Static methods14121.89%
▷ Public methods54384.32%
▷ Protected methods8513.20%
▷ Private methods162.48%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants130
▷ Global constants2720.77%
▷ Class constants10379.23%
▷ Public constants103100.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
PNG images were not found in this plugin