84% update-comments-count

Code Review | Update Comments Count

WordPress plugin Update Comments Count scored84%from 54 tests.

About plugin

  • Plugin page: update-comments-c...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.2-4.3
  • WordPress version: 6.3.1
  • First release: Apr 24, 2015
  • Latest release: Aug 31, 2015
  • Number of updates: 7
  • Update frequency: every 18.6 days
  • Top authors: pauiglesias (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

100+ active /2,421 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.16ms] Passed 4 tests

Analyzing server-side resources used by Update Comments Count
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.33 ▼5.44
Dashboard /wp-admin3.36 ▲0.0647.16 ▼5.01
Posts /wp-admin/edit.php3.41 ▲0.0547.99 ▲3.08
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.48 ▼9.47
Media Library /wp-admin/upload.php3.28 ▲0.0534.33 ▼0.73
Update Comments Count /wp-admin/tools.php?page=update-comments-count3.2229.89

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Update Comments Count
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.41 ▼0.871.77 ▼0.1441.12 ▼4.97
Dashboard /wp-admin2,213 ▲214.84 ▼0.15109.24 ▼12.4438.33 ▼6.28
Posts /wp-admin/edit.php2,093 ▲71.97 ▼0.0539.90 ▲1.6635.46 ▲0.24
Add New Post /wp-admin/post-new.php1,517 ▼917.86 ▼5.30621.61 ▼60.9257.29 ▲1.71
Media Library /wp-admin/upload.php1,392 ▲44.22 ▼0.1295.50 ▼11.8142.16 ▼5.39
Update Comments Count /wp-admin/tools.php?page=update-comments-count8631.7025.2028.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=update-comments-count
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/tools.php?page=update-comments-count
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

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

This is the main PHP file of "Update Comments Count" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
101 characters long description:
An easy way to update post comments counters, even for large sites, using WordPress standar function.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected312 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1140121195
PO File1171762
JavaScript135055

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods1173.33%
▷ Public methods533.33%
▷ Protected methods00.00%
▷ Private methods1066.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants00.00%
▷ Class constants11100.00%
▷ Public constants11100.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
PNG images were not found in this plugin