79% ugc-comments

Code Review | UGC Comments

WordPress plugin UGC Comments scored79%from 54 tests.

About plugin

  • Plugin page: ugc-comments
  • Plugin version: 1.00
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2019
  • Latest release: Oct 30, 2022
  • Number of updates: 16
  • Update frequency: every 71.3 days
  • Top authors: Flector (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /2,475 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by UGC Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.92 ▲0.11
Dashboard /wp-admin3.36 ▲0.0247.45 ▼10.41
Posts /wp-admin/edit.php3.41 ▲0.0645.94 ▲4.26
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.55 ▼14.72
Media Library /wp-admin/upload.php3.29 ▲0.0634.44 ▼2.51

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
ugcc_options
theysaidso_admin_options

Browser metrics Passed 4 tests

UGC Comments: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.78 ▲0.391.82 ▲0.1243.35 ▲3.30
Dashboard /wp-admin2,207 ▲215.83 ▲0.8696.88 ▼12.0538.58 ▼0.80
Posts /wp-admin/edit.php2,096 ▲72.06 ▲0.0538.96 ▲3.8831.71 ▼1.38
Add New Post /wp-admin/post-new.php1,541 ▲2723.11 ▲5.47651.47 ▲49.2055.17 ▲2.96
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.0196.33 ▼4.5541.83 ▼0.23
UGC Comments /wp-admin/ugc-comments.php260.440.1213.60

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ugc-comments/ugc-comments.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/ugc-comments.php
    • > Network (severe)
    wp-admin/ugc-comments.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: seo, google, nofollow, ugc, rel

ugc-comments/ugc-comments.php Passed 13 tests

"UGC Comments" version 1.00's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
103 characters long description:
The plugin allows you to manage the values of the "rel" attribute in comment links ("ugc", "nofollow").

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 detected597 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript47047299
PHP15243252
CSS25746

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/icon_coffee.png5.14KB5.32KB0.00%