79% swiftninjapro-comments

Code Review | Better Page Comments

WordPress plugin Better Page Comments scored79%from 54 tests.

About plugin

  • Plugin page: swiftninjapro-com...
  • Plugin version: 1.4.9
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Apr 17, 2019
  • Latest release: Oct 22, 2020
  • Number of updates: 37
  • Update frequency: every 15.0 days
  • Top authors: swiftninjapro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /798 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.57ms] Passed 4 tests

An overview of server-side resources used by Better Page Comments
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.88 ▼6.93
Dashboard /wp-admin3.33 ▲0.0347.45 ▼3.28
Posts /wp-admin/edit.php3.39 ▲0.0349.17 ▲0.18
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.63 ▼16.24
Media Library /wp-admin/upload.php3.26 ▲0.0337.06 ▲2.02
SwiftNinjaPro Settings /wp-admin/admin.php?page=swiftninjapro-settings3.2230.90
Comments /wp-admin/admin.php?page=swiftninjapro-comments3.3433.27

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Better Page Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲8114.36 ▲0.092.05 ▲0.4138.38 ▼7.29
Dashboard /wp-admin2,218 ▲415.56 ▼0.0982.10 ▼8.3076.38 ▲30.35
Posts /wp-admin/edit.php2,123 ▲231.99 ▲0.0133.44 ▼1.4333.08 ▲0.08
Add New Post /wp-admin/post-new.php1,562 ▲3623.13 ▼0.43662.51 ▲25.01120.16 ▲71.70
Media Library /wp-admin/upload.php1,426 ▲324.11 ▼0.0495.89 ▼4.6768.25 ▲24.59
SwiftNinjaPro Settings /wp-admin/admin.php?page=swiftninjapro-settings7932.1625.7327.56
Comments /wp-admin/admin.php?page=swiftninjapro-comments1,0812.0425.1438.22

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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 errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=swiftninjapro-comments
    • > Warning in wp-content/plugins/swiftninjapro-comments/templates/admin.php+94
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

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 items
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/swiftninjapro-comments/templates/settings-info.php
    • > /wp-content/plugins/swiftninjapro-comments/templates/admin.php
    • > /wp-content/plugins/swiftninjapro-comments/main.php
    • > /wp-content/plugins/swiftninjapro-comments/swiftninjapro-comments.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: query, strip-html, comments, anti-spam, shortcode

swiftninjapro-comments/swiftninjapro-comments.php Passed 13 tests

The main PHP script in "Better Page Comments" version 1.4.9 is automatically included on every request by WordPress
120 characters long description:
Comments that Strip away HTML, but allow basic fonts through custom tags. Also includes some basic spam control options.

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 plugin890 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP519533879
JavaScript10011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity68.00
▷ Minimum class complexity20.00
▷ Maximum class complexity116.00
Average method complexity5.32
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/settings_icon.png3.27KB1.85KB▼ 43.48%