77% kittens-for-comments

Code Review | Kittens for Comments

WordPress plugin Kittens for Comments scored77%from 54 tests.

About plugin

  • Plugin page: kittens-for-comments
  • Plugin version: 3.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.4
  • WordPress version: 6.3.1
  • First release: Aug 21, 2013
  • Latest release: Nov 28, 2015
  • Number of updates: 18
  • Update frequency: every 46.1 days
  • Top authors: WilltheWebMechanic (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,619 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.88ms] Passed 4 tests

This is a short check of server-side resources used by Kittens for Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.14 ▼6.49
Dashboard /wp-admin3.34 ▲0.0344.35 ▼4.05
Posts /wp-admin/edit.php3.39 ▲0.0343.78 ▼8.10
Add New Post /wp-admin/post-new.php5.92 ▲0.03101.52 ▲4.30
Media Library /wp-admin/upload.php3.26 ▲0.0338.96 ▲3.14
WtWM Plugins /wp-admin/admin.php?page=wwm_plugins3.2031.46
Kittens for Comments /wp-admin/admin.php?page=kittens-for-comments3.2331.51

Server storage [IO: ▲1.53MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/kittens-for-comments/" and "wp-content/uploads/"
    • (new file) wp-content/cache/seraphinite-accelerator/at
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Kittens for Comments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲8714.80 ▲0.421.69 ▲0.1235.73 ▼10.63
Dashboard /wp-admin2,228 ▲405.85 ▲0.9497.72 ▼4.5170.56 ▲28.00
Posts /wp-admin/edit.php2,111 ▲222.00 ▼0.0535.37 ▼6.4833.32 ▼1.26
Add New Post /wp-admin/post-new.php1,687 ▲17322.47 ▲4.83693.79 ▲4.8263.13 ▲14.55
Media Library /wp-admin/upload.php1,407 ▲194.18 ▼0.0195.49 ▼14.0877.83 ▲33.92
WtWM Plugins /wp-admin/admin.php?page=wwm_plugins8202.0124.7124.93
Kittens for Comments /wp-admin/admin.php?page=kittens-for-comments8002.0223.6028.49

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
These items require your attention
  • 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 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wwm_plugins
    • > Notice in wp-content/plugins/kittens-for-comments/kittens4comments.php+103
    Undefined variable: wwm_plugin_links

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kittens-for-comments/kittens4comments.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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:
  • Screenshots: These screenshots require images: #1 (The panel that appears when your comment form comes in to view), #2 (Kitten!)
Please take inspiration from this readme.txt

kittens-for-comments/kittens4comments.php 85% from 13 tests

Analyzing the main PHP file in "Kittens for Comments" version 3.0.2
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("kittens-for-comments.php" instead of "kittens4comments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin258 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP12682105
CSS451275
Markdown122050
JavaScript421328

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.86MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/overlay.png0.11KB0.15KB0.00%
screenshot-2.png733.23KB268.17KB▼ 63.43%
css/images/border.png0.07KB0.10KB0.00%
images/wwm_wp_menu.png3.72KB0.74KB▼ 80.06%
screenshot-1.png137.84KB64.85KB▼ 52.95%