61% anycomment

Code Review | AnyComment

WordPress plugin AnyComment scored61%from 54 tests.

About plugin

  • Plugin page: anycomment
  • Plugin version: 0.3.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Jun 24, 2018
  • Latest release: May 14, 2022
  • Number of updates: 127
  • Update frequency: every 11.2 days
  • Top authors: ateshabaev (99.21%)mihdan (1.57%)

Code review

54 tests

User reviews

152 reviews

Install metrics

3,000+ active /91,431 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.87MB] [CPU: ▼0.62ms] 75% from 4 tests

Analyzing server-side resources used by AnyComment
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 2,920.67ms on /wp-admin/admin.php?page=anycomment-dashboard)
PageMemory (MB)CPU Time (ms)
Home /5.68 ▲2.2254.33 ▲4.26
Dashboard /wp-admin6.08 ▲2.7374.18 ▲12.57
Posts /wp-admin/edit.php6.11 ▲2.7574.72 ▲16.72
Add New Post /wp-admin/post-new.php5.65 ▼0.2459.29 ▼36.03
Media Library /wp-admin/upload.php5.98 ▲2.7572.17 ▲41.99
Emails /wp-admin/admin.php?page=anycomment-emails5.9157.53
Subscriptions /wp-admin/admin.php?page=anycomment-subscriptions5.9152.76
Rating /wp-admin/admin.php?page=anycomment-rating5.9150.20
AnyComment /wp-admin/admin.php?page=anycomment-dashboard6.162,920.67
Files /wp-admin/admin.php?page=anycomment-files5.91359.17

Server storage [IO: ▲5.53MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • The plugin illegally modified 6 files (10.94KB) outside of "wp-content/plugins/anycomment/" and "wp-content/uploads/"
    • (new file) wp-content/cache/anycomment/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/3c5b9ab262018325/0766c8dc12b7fc4c/9b87b6e21a74caab/f02f75b28bb0fb66/9bc65c2abec14177/8ffaa729489f3e87/3d02bed54d8ed5ca/05f43d64694250be/7c5e8e79d9bddf95/be8a7082cddc342f.php
    • (new file) wp-content/cache/anycomment/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/3c5b9ab262018325/0766c8dc12b7fc4c/a912a94d79b5124d/876951f96ebb256f/3fb832a0a291a746/629bd888d996c0f3.php
    • (new file) wp-content/cache/anycomment/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/3c5b9ab262018325/0766c8dc12b7fc4c/a912a94d79b5124d/876951f96ebb256f/310ac523f0b1646f/ea79f5df345aa512.php
    • (new file) wp-content/cache/anycomment/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/3c5b9ab262018325/0766c8dc12b7fc4c/9b87b6e21a74caab/f02f75b28bb0fb66/9bc65c2abec14177/8ffaa729489f3e87/3d02bed54d8ed5ca/05f43d64694250be/706336e5e47e3dac/44f53537e8eda924.php
    • (new file) wp-content/cache/anycomment/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/3c5b9ab262018325/0766c8dc12b7fc4c/508c75c8507a2ae5/223dfd2faeb98122/9b87b6e21a74caab/f02f75b28bb0fb66/49d224030c7667fc/a76bfe7eea96c3e2/eccbc87e4b5ce2fe/28308fd9f2a7baf3.php
    • (new file) wp-content/cache/anycomment/0fea6a13c52b4d47/25368f24b045ca84/38a865804f8fdcb6/57cd99682e939275/3c5b9ab262018325/0766c8dc12b7fc4c/9b87b6e21a74caab/f02f75b28bb0fb66/9bc65c2abec14177/8ffaa729489f3e87/3d02bed54d8ed5ca/05f43d64694250be/6e0351a91f1a274f/d07a9932fdb78a7c.php
Filesystem: 644 new files
Database: 5 new tables, 11 new options
New tables
wp_anycomment_uploaded_files
wp_anycomment_subscriptions
wp_anycomment_likes
wp_anycomment_email_queue
wp_anycomment_rating
New WordPress options
anycomment-social
can_compress_scripts
anycomment_migration
anycomment-integration
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
anycomment-generic
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for AnyComment
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.32 ▼0.895.78 ▲3.9542.19 ▼0.07
Dashboard /wp-admin2,232 ▲445.80 ▼0.01108.15 ▼10.2681.99 ▲37.02
Posts /wp-admin/edit.php2,130 ▲381.97 ▼0.0338.16 ▼6.6135.29 ▼2.28
Add New Post /wp-admin/post-new.php1,562 ▲3418.43 ▼4.64744.20 ▲146.5259.48 ▲15.06
Media Library /wp-admin/upload.php1,426 ▲414.13 ▼0.11108.34 ▲4.0679.11 ▲31.62
Emails /wp-admin/admin.php?page=anycomment-emails1,1413.5952.1765.59
Subscriptions /wp-admin/admin.php?page=anycomment-subscriptions1,1543.4547.2038.28
Rating /wp-admin/admin.php?page=anycomment-rating1,1373.4334.9537.48
AnyComment /wp-admin/admin.php?page=anycomment-dashboard1,2574.89112.8788.49
Files /wp-admin/admin.php?page=anycomment-files1,0773.4338.7235.90

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables were found after uninstall: 5 tables
    • wp_anycomment_rating
    • wp_anycomment_uploaded_files
    • wp_anycomment_likes
    • wp_anycomment_subscriptions
    • wp_anycomment_email_queue
  • This plugin does not fully uninstall, leaving 11 options in the database
    • widget_anycomment-comment-list
    • can_compress_scripts
    • anycomment-integration
    • anycomment-social
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • anycomment_migration
    • db_upgraded
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=anycomment-files
    • > Notice in wp-content/plugins/anycomment/templates/admin/tables/files.php+26
    Undefined index: action

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
  • 288× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stash\\Driver\\AbstractDriver' not found in wp-content/plugins/anycomment/vendor/tedivm/stash/src/Stash/Driver/Sqlite.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Exception\\InvalidArgumentException' not found in wp-content/plugins/anycomment/vendor/hybridauth/hybridauth/src/Exception/InvalidApplicationCredentialsException.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/anycomment/vendor/hybridauth/hybridauth/src/Provider/Mailru.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\HttpClient\\Util' not found in wp-content/plugins/anycomment/vendor/hybridauth/hybridauth/examples/example_02.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/anycomment/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/anycomment/vendor/hybridauth/hybridauth/src/Provider/Amazon.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Hybridauth\\Adapter\\OAuth2' not found in wp-content/plugins/anycomment/vendor/hybridauth/hybridauth/src/Provider/Slack.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/anycomment/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\SocketHandler' not found in wp-content/plugins/anycomment/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'AnyComment\\AnyCommentServiceApi' not found in wp-content/plugins/anycomment/templates/admin/saas-notice.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=anycomment-dashboard
    • > Console-api (severe) in wp-content/plugins/anycomment/assets/js/Chart.min.js?ver=0.3.6+12:85979
    Invalid scale configuration for scale: yAxes

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

anycomment/anycomment.php 92% from 13 tests

"AnyComment" version 0.3.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6" instead of "5.4")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin46,171 lines of code in 592 files:
LanguageFilesBlank linesComment linesLines of code
PHP47011,08422,90437,648
Sass254614984,243
Markdown1574901,448
JSON12001,000
JavaScript554952892
SVG5403426
CSS3471353
HTML7224122
YAML13039

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.72
▷ Minimum class complexity1.00
▷ Maximum class complexity735.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces76
Interfaces35
Traits5
Classes382
▷ Abstract classes205.24%
▷ Concrete classes36294.76%
▷ Final classes92.49%
Methods2,633
▷ Static methods50919.33%
▷ Public methods1,92072.92%
▷ Protected methods59822.71%
▷ Private methods1154.37%
Functions102
▷ Named functions1413.73%
▷ Anonymous functions8886.27%
Constants356
▷ Global constants61.69%
▷ Class constants35098.31%
▷ Public constants350100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
assets/img/no-avatar.png3.88KB2.20KB▼ 43.36%
assets/img/admin-menu-logo.png0.75KB0.88KB0.00%