84% lh-native-comments

Code Review | LH Native Comments

WordPress plugin LH Native Comments scored84%from 54 tests.

About plugin

  • Plugin page: lh-native-comments
  • Plugin version: 1.74
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Aug 15, 2015
  • Latest release: Dec 5, 2017
  • Number of updates: 17
  • Update frequency: every 49.7 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /935 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.27ms] Passed 4 tests

Analyzing server-side resources used by LH Native Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.75 ▼0.40
Dashboard /wp-admin3.33 ▼0.0148.82 ▼14.19
Posts /wp-admin/edit.php3.44 ▲0.0946.49 ▲0.37
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.32 ▼10.85
Media Library /wp-admin/upload.php3.25 ▲0.0236.95 ▲1.27

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

LH Native Comments: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.61 ▼0.2443.94 ▼1.63
Dashboard /wp-admin2,195 ▲155.60 ▼0.0694.57 ▼3.2542.41 ▼0.36
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0239.00 ▲5.0835.61 ▼2.13
Add New Post /wp-admin/post-new.php1,526 ▼123.35 ▲0.34678.15 ▲14.2657.30 ▲0.77
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.0697.27 ▼5.6843.45 ▼0.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lh-native-comments/lh-native-comments.php:694

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: emails, mobile, comments, validate, thml5...

lh-native-comments/lh-native-comments.php 92% from 13 tests

"LH Native Comments" version 1.74's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected417 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1299108319
JavaScript177598

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods1568.18%
▷ Protected methods00.00%
▷ Private methods731.82%
Functions0
▷ Named functions00.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
No PNG files were detected