78% lazy-facebook-comments

Code Review | Lazy Social Comments

WordPress plugin Lazy Social Comments scored78%from 54 tests.

About plugin

  • Plugin page: lazy-facebook-com...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 12, 2014
  • Latest release: Sep 3, 2023
  • Number of updates: 33
  • Update frequency: every 101.3 days
  • Top authors: joelcj91 (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

2,000+ active /40,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.34ms] Passed 4 tests

Analyzing server-side resources used by Lazy Social Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.75 ▼0.20
Dashboard /wp-admin3.39 ▲0.0848.08 ▼2.33
Posts /wp-admin/edit.php3.50 ▲0.1479.00 ▲27.22
Add New Post /wp-admin/post-new.php6.06 ▲0.1786.43 ▼15.23
Media Library /wp-admin/upload.php3.32 ▲0.1030.40 ▼3.59
Lazy FB Comments /wp-admin/options-general.php?page=lfc-settings3.3132.89

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

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

Browser metrics Passed 4 tests

Lazy Social Comments: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲5214.79 ▲0.421.78 ▼2.6142.79 ▲1.50
Dashboard /wp-admin2,204 ▲164.83 ▼0.07109.49 ▲5.4638.58 ▼6.68
Posts /wp-admin/edit.php2,087 ▼51.97 ▼0.0241.26 ▲0.4230.88 ▼5.20
Add New Post /wp-admin/post-new.php1,516 ▲223.10 ▲5.62616.15 ▼28.9459.78 ▲2.64
Media Library /wp-admin/upload.php1,389 ▲44.22 ▲0.04104.15 ▼1.8241.13 ▼8.30
Lazy FB Comments /wp-admin/options-general.php?page=lfc-settings1,0612.0722.9731.60

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 11× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/lazy-facebook-comments/public/lfc-comments.php
    • > /wp-content/plugins/lazy-facebook-comments/includes/class-lazy-facebook-comments.php
    • > /wp-content/plugins/lazy-facebook-comments/includes/class-lfc-activator.php
    • > /wp-content/plugins/lazy-facebook-comments/public/lfc-closed-comments.php
    • > /wp-content/plugins/lazy-facebook-comments/includes/class-lfc-loader.php
    • > /wp-content/plugins/lazy-facebook-comments/public/class-lfc-public.php
    • > /wp-content/plugins/lazy-facebook-comments/admin/class-lfc-admin.php
    • > /wp-content/plugins/lazy-facebook-comments/admin/partials/lfc-admin-display.php
    • > /wp-content/plugins/lazy-facebook-comments/includes/class-lfc-i18n.php
    • > /wp-content/plugins/lazy-facebook-comments/uninstall.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lazy-facebook-comments/admin/partials/lfc-admin-credits-tab.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/lazy-facebook-comments/admin/partials/lfc-admin-general-tab.php:4

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: fb comments, lazy comments, facebook comments, facebook lazy comments, lazy load fb...

lazy-facebook-comments/lazy-facebook-comments.php 92% from 13 tests

The primary PHP file in "Lazy Social Comments" version 2.0.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)

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
Everything looks great! No dangerous files found in this plugin675 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP14177675637
CSS14938

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.17
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods38
▷ Static methods12.63%
▷ Public methods2668.42%
▷ Protected methods00.00%
▷ Private methods1231.58%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin