84% comment-analyzer

Code Review | Comment Analyzer

WordPress plugin Comment Analyzer scored84%from 54 tests.

About plugin

  • Plugin page: comment-analyzer
  • Plugin version: 0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Dec 15, 2018
  • Latest release: Dec 15, 2018
  • Number of updates: 5
  • Update frequency: every 1.2 days
  • Top authors: shaileshtyagi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.67ms] Passed 4 tests

Server-side resources used by Comment Analyzer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.76 ▼9.62
Dashboard /wp-admin3.32 ▲0.0149.31 ▼1.94
Posts /wp-admin/edit.php3.37 ▲0.0149.19 ▲1.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.62 ▼3.82
Media Library /wp-admin/upload.php3.25 ▲0.0136.35 ▲0.69

Server storage [IO: ▲0.61MB] [DB: ▲0.31MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Comment Analyzer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.40 ▼0.232.04 ▼0.1744.03 ▼0.70
Dashboard /wp-admin2,195 ▲215.65 ▼0.0587.44 ▼0.4239.93 ▼0.72
Posts /wp-admin/edit.php2,100 ▲31.97 ▲0.0039.98 ▲2.8236.63 ▼1.98
Add New Post /wp-admin/post-new.php1,534 ▲818.12 ▼5.06677.46 ▲8.6368.90 ▲6.61
Media Library /wp-admin/upload.php1,394 ▼64.24 ▲0.04105.06 ▲10.8742.62 ▼1.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | 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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/comment-analyzer/comment-analyzer.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: comment analysis, sentiment analysis, comment-analyzer

comment-analyzer/comment-analyzer.php Passed 13 tests

Analyzing the main PHP file in "Comment Analyzer" version 0.2
89 characters long description:
Comment Analyzer is a plugin that helps you moderate the comments on your WordPress site.

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
Success! There were no dangerous files found in this plugin501 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2171307454
Markdown113047

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity40.50
▷ Minimum class complexity6.00
▷ Maximum class complexity75.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods2165.62%
▷ Protected methods00.00%
▷ Private methods1134.38%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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