83% lnc-near-comments

Code Review | LNC Near Comments

WordPress plugin LNC Near Comments scored83%from 54 tests.

About plugin

  • Plugin page: lnc-near-comments
  • Plugin version: 0.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 21, 2023
  • Latest release: Nov 25, 2023
  • Number of updates: 25
  • Update frequency: every 8.7 days
  • Top authors: learnnearclub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /323 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.52ms] Passed 4 tests

Server-side resources used by LNC Near Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.46 ▼4.27
Dashboard /wp-admin3.31 ▼0.0345.71 ▼13.38
Posts /wp-admin/edit.php3.36 ▲0.0147.41 ▼1.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.43 ▼16.25
Media Library /wp-admin/upload.php3.24 ▲0.0131.90 ▼4.19

Server storage [IO: ▲1.11MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for LNC Near Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3114.35 ▼0.301.76 ▲0.0243.30 ▼0.63
Dashboard /wp-admin2,198 ▲185.50 ▼0.1689.06 ▼6.7839.24 ▼7.26
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0539.44 ▲2.3036.30 ▲2.67
Add New Post /wp-admin/post-new.php1,529 ▲323.73 ▲0.91613.79 ▼65.1055.66 ▼2.00
Media Library /wp-admin/upload.php1,406 ▲64.23 ▲0.0396.96 ▼13.9941.28 ▼5.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/lnc-near-comments/index.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'LNCNearComments\\Model\\Abstractions\\AdminPages' not found in wp-content/plugins/lnc-near-comments/Model/Constructor/ConfigPage.php:13
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/lnc-near-comments/index.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lnc-near-comments/index.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/lnc-near-comments/index.php:23

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Contributors: Contributors not specified
You can take inspiration from this readme.txt

lnc-near-comments/index.php 92% from 13 tests

The primary PHP file in "LNC Near Comments" version 0.1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lnc-near-comments.php" instead of "index.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
No dangerous file extensions were detected8,926 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
JSON4007,634
PHP192205751,045
JavaScript82440247

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.83
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods81
▷ Static methods2328.40%
▷ Public methods7288.89%
▷ Protected methods33.70%
▷ Private methods67.41%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants6
▷ Global constants00.00%
▷ Class constants6100.00%
▷ Public constants6100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.52MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png16.96KB8.59KB▼ 49.36%
assets/screenshot-3.png24.26KB11.26KB▼ 53.59%
assets/screenshot-4.png56.06KB25.90KB▼ 53.80%
assets/screenshot-1.png184.68KB80.51KB▼ 56.40%
(invalid) assets/screenshot-8.png52.76KB0.00KB▼ 100.00%