78% wp-lightning-comments

Code Review | Pay to Comment with Lightning

WordPress plugin Pay to Comment with Lightning scored 78% from 54 tests.

About plugin

  • Plugin page: wp-lightning-comm...
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0
  • WordPress version: 6.3.1
  • First release: Jun 14, 2018
  • Latest release: May 29, 2022
  • Number of updates: 6
  • Update frequency: every 240.8 days
  • Top authors: pseudozach (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 623 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Pay to Comment with Lightning
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.21 ▼6.39
Dashboard /wp-admin3.32 ▲0.0244.37 ▼0.02
Posts /wp-admin/edit.php3.37 ▲0.0247.71 ▲3.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.35 ▼0.45
Media Library /wp-admin/upload.php3.24 ▲0.0238.27 ▲6.84
Pay to Comment with Lightning /wp-admin/options-general.php?page=lightning_comments3.1927.94

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Pay to Comment with Lightning
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7813.69 ▼0.712.63 ▲0.5441.49 ▼6.94
Dashboard /wp-admin2,210 ▲555.91 ▲0.30102.44 ▼2.6737.48 ▼1.24
Posts /wp-admin/edit.php2,096 ▲72.03 ▲0.0238.94 ▲3.4934.63 ▼4.61
Add New Post /wp-admin/post-new.php1,536 ▲2223.10 ▲5.45658.00 ▲63.8351.56 ▲2.47
Media Library /wp-admin/upload.php1,389 ▲14.20 ▲0.0098.50 ▼0.4144.76 ▲1.22
Pay to Comment with Lightning /wp-admin/options-general.php?page=lightning_comments8362.0324.4326.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=lightning_comments
    • > Notice in wp-content/plugins/wp-lightning-comments/lightningcomments.php+270
    Trying to access array offset on value of type bool

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-lightning-comments/lightningcomments.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

wp-lightning-comments/lightningcomments.php 92% from 13 tests

The main file in "Pay to Comment with Lightning" v. 0.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-lightning-comments.php" instead of "lightningcomments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin466 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP14622229
JavaScript23347193
CSS12330
Markdown13014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants2
▷ Global constants2100.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