90% update-comment-count

Code Review | Update Comment Count

WordPress plugin Update Comment Count scored 90% from 54 tests.

About plugin

  • Plugin page: update-comment-count
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 15, 2019
  • Latest release: Jun 8, 2022
  • Number of updates: 9
  • Update frequency: every 104.0 days
  • Top authors: dineshpilani05 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80+ active / 1,521 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Update Comment Count
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.13 ▼5.23
Dashboard /wp-admin3.32 ▲0.0145.69 ▼3.30
Posts /wp-admin/edit.php3.37 ▲0.0145.43 ▼1.93
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.58 ▼9.77
Media Library /wp-admin/upload.php3.24 ▲0.0137.17 ▲1.41

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Update Comment Count
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲8013.23 ▼1.531.94 ▼0.2341.98 ▼0.19
Dashboard /wp-admin2,215 ▲275.87 ▼0.0097.22 ▼11.6637.78 ▼4.72
Posts /wp-admin/edit.php2,080 ▼62.02 ▼0.0236.31 ▲1.3043.55 ▲10.20
Add New Post /wp-admin/post-new.php1,545 ▲1223.32 ▲0.08639.04 ▲6.7493.11 ▲34.08
Media Library /wp-admin/upload.php1,397 ▲94.31 ▲0.1194.15 ▼11.1840.89 ▼5.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: recalculate comment count, comment count

update-comment-count/update-comment-count.php Passed 13 tests

This is the main PHP file of "Update Comment Count" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
116 characters long description:
After exporting and importing your comments from one website to another use this plugin to update your comment count

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
Good job! No executable or dangerous file extensions detected46 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP231346

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected