67% commentluv

Code Review | CommentLuv

WordPress plugin CommentLuv scored67%from 54 tests.

About plugin

  • Plugin page: commentluv
  • Plugin version: 3.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.3
  • WordPress version: 6.3.1
  • First release: Sep 30, 2007
  • Latest release: Feb 2, 2020
  • Number of updates: 318
  • Update frequency: every 14.2 days
  • Top authors: teamplaylotto (50.31%)commentluv (45.6%)seanbarton (2.83%)bompus (2.2%)

Code review

54 tests

User reviews

21 reviews

Install metrics

4,000+ active /1,028,564 total downloads

Benchmarks

Plugin footprint 65% 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.32MB] [CPU: ▼3.05ms] Passed 4 tests

Server-side resources used by CommentLuv
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3339.00 ▼3.14
Dashboard /wp-admin3.62 ▲0.3246.61 ▼5.03
Posts /wp-admin/edit.php3.73 ▲0.3847.30 ▼1.31
Add New Post /wp-admin/post-new.php6.20 ▲0.32100.25 ▼2.72
Media Library /wp-admin/upload.php3.54 ▲0.3235.84 ▲2.76
CommentLuv /wp-admin/options-general.php?page=commentluv-options3.5132.09

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 146 new files
Database: no new tables, 8 new options
New WordPress options
cl_version
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
commentluv_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

CommentLuv: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲17313.61 ▼0.759.60 ▲7.8239.90 ▼4.84
Dashboard /wp-admin2,213 ▲254.83 ▼1.07107.32 ▼6.8542.48 ▼4.45
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0239.22 ▼2.4734.53 ▼0.06
Add New Post /wp-admin/post-new.php1,519 ▲517.50 ▲0.07647.87 ▼67.5454.78 ▼9.90
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.0495.68 ▼14.7840.41 ▼3.12
CommentLuv /wp-admin/options-general.php?page=commentluv-options1,6142.3627.9249.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'commentluv' does not have a method 'deactivation'
  • Zombie WordPress options detected upon uninstall: 8 options
    • theysaidso_admin_options
    • db_upgraded
    • cl_version
    • commentluv_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 0% from 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
Please fix the following items
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/commentluv/videos/operationalsettings.php
    • > /wp-content/plugins/commentluv/videos/messagessettings.php
    • > /wp-content/plugins/commentluv/videos/technicalsettings.php
    • > /wp-content/plugins/commentluv/videos/appearancesettings.php
    • > /wp-content/plugins/commentluv/videos/starthere.php
    • > /wp-content/plugins/commentluv/videos/primarysettings.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Interface 'SimpleCluvPie_Cache_Base' not found in wp-content/plugins/commentluv/libs/SimpleCluvPie/library/SimpleCluvPie/Cache/DB.php:50
    • > PHP Fatal error
      Uncaught Error: Interface 'SimpleCluvPie_Cache_Base' not found in wp-content/plugins/commentluv/libs/SimpleCluvPie/library/SimpleCluvPie/Cache/Memcached.php:58
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCluvPie' not found in wp-content/plugins/commentluv/libs/SimpleCluvPie/library/SimpleCluvPie/Core.php:53
    • > PHP Fatal error
      Uncaught Error: Interface 'SimpleCluvPie_Cache_Base' not found in wp-content/plugins/commentluv/libs/SimpleCluvPie/library/SimpleCluvPie/Cache/Memcache.php:57
    • > PHP Fatal error
      Uncaught Error: Interface 'SimpleCluvPie_Cache_Base' not found in wp-content/plugins/commentluv/libs/SimpleCluvPie/library/SimpleCluvPie/Cache/Redis.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCluvPie_Cache_DB' not found in wp-content/plugins/commentluv/libs/SimpleCluvPie/library/SimpleCluvPie/Cache/MySQL.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/commentluv/commentluv.php:1149
    • > PHP Fatal error
      Uncaught Error: Interface 'SimpleCluvPie_Cache_Base' not found in wp-content/plugins/commentluv/libs/SimpleCluvPie/library/SimpleCluvPie/Cache/File.php:50
    • > PHP Fatal error
      Uncaught Error: Class 'SimpleCluvPie_Misc' not found in wp-content/plugins/commentluv/libs/SimpleCluvPie/library/SimpleCluvPie.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (settings page), #2 (in use), #3 (comments admin), #4 (edit post comments)
Please take inspiration from this readme.txt

commentluv/commentluv.php 92% from 13 tests

Analyzing the main PHP file in "CommentLuv" version 3.0.4
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected25,066 lines of code in 79 files:
LanguageFilesBlank linesComment linesLines of code
PHP441,6766,40715,257
PO File314,2384,6189,306
JavaScript34165331
CSS13311172

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity should be reduced to less than 100 (currently 808)
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity85.69
▷ Minimum class complexity1.00
▷ Maximum class complexity947.00
Average method complexity7.56
▷ Minimum method complexity1.00
▷ Maximum method complexity808.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes38
▷ Abstract classes12.63%
▷ Concrete classes3797.37%
▷ Final classes00.00%
Methods508
▷ Static methods479.25%
▷ Public methods47092.52%
▷ Protected methods316.10%
▷ Private methods71.38%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants75
▷ Global constants7397.33%
▷ Class constants22.67%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 PNG files occupy 0.65MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/playbuttonsmall.png1.89KB1.42KB▼ 24.96%
images/cl_bar_t18_s.png4.93KB3.35KB▼ 32.01%
images/linkedin.png0.64KB0.77KB0.00%
images/skype.png3.51KB0.90KB▼ 74.26%
images/facebook.png0.25KB0.15KB▼ 40.70%