84% anycomment-analytics

Code Review | AnyComment Analytics

WordPress plugin AnyComment Analytics scored84%from 54 tests.

About plugin

  • Plugin page: anycomment-analytics
  • Plugin version: 0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3
  • WordPress version: 6.3.1
  • First release: Dec 25, 2019
  • Latest release: Dec 25, 2019
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: ateshabaev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,708 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.01ms] Passed 4 tests

Analyzing server-side resources used by AnyComment Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.29 ▼2.65
Dashboard /wp-admin3.31 ▼0.0350.01 ▼15.68
Posts /wp-admin/edit.php3.36 ▲0.0149.22 ▼3.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.68 ▼22.61
Media Library /wp-admin/upload.php3.24 ▲0.0135.39 ▼1.74

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

AnyComment Analytics: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲8713.20 ▼1.381.67 ▼0.2944.08 ▼0.90
Dashboard /wp-admin2,239 ▲364.96 ▲0.08106.01 ▼4.7941.30 ▼1.99
Posts /wp-admin/edit.php2,121 ▲212.23 ▲0.2237.52 ▲1.5735.07 ▼3.40
Add New Post /wp-admin/post-new.php1,542 ▼717.70 ▼5.59662.01 ▼16.6235.92 ▼22.66
Media Library /wp-admin/upload.php1,418 ▲184.38 ▲0.1198.09 ▼19.3045.11 ▼5.33

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/anycomment-analytics/templates/tab-summary.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/anycomment-analytics/templates/tab-files.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/anycomment-analytics/templates/tab-users.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/anycomment-analytics/templates/tab-emails.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function menu_page_url() in wp-content/plugins/anycomment-analytics/templates/graphs.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/anycomment-analytics/templates/tab-comments.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'EmailNotificationInterface' not found in wp-content/plugins/anycomment-analytics/includes/Emails/AdminNotification.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/anycomment-analytics/templates/tab-posts.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ReportSettings' not found in wp-content/plugins/anycomment-analytics/templates/tab-reports.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: anycomment, anycomment analytics, comment analytics, analytics

anycomment-analytics/anycomment-analytics.php 92% from 13 tests

This is the main PHP file of "AnyComment Analytics" version 0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin18,325 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PO File2145154379

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity16.75
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
▷ Static methods2934.94%
▷ Public methods7489.16%
▷ Protected methods00.00%
▷ Private methods910.84%
▷ Named functions133.33%
▷ Anonymous functions266.67%
▷ Global constants646.15%
▷ Class constants753.85%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings