84% show-all-comments-in-one-page

Code Review | Show All Comments

WordPress plugin Show All Comments scored 84% from 54 tests.

About plugin

  • Plugin page: show-all-comments...
  • Plugin version: 7.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-6.1
  • WordPress version: 6.3.1
  • First release: Dec 11, 2014
  • Latest release: Dec 21, 2022
  • Number of updates: 70
  • Update frequency: every 41.9 days
  • Top authors: biztechc (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

800+ active / 14,783 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.97ms] Passed 4 tests

This is a short check of server-side resources used by Show All Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.75 ▼4.23
Dashboard /wp-admin3.32 ▲0.0254.83 ▲3.29
Posts /wp-admin/edit.php3.37 ▲0.0145.90 ▼8.57
Add New Post /wp-admin/post-new.php5.90 ▲0.01100.78 ▲8.41
Media Library /wp-admin/upload.php3.24 ▲0.0138.30 ▼2.35

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

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

Browser metrics Passed 4 tests

Show All Comments: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲10613.58 ▼0.897.75 ▲5.7639.90 ▼2.37
Dashboard /wp-admin2,222 ▲164.83 ▼0.02118.73 ▲6.3942.09 ▲0.78
Posts /wp-admin/edit.php2,108 ▲192.01 ▼0.0039.47 ▲0.6936.94 ▲2.46
Add New Post /wp-admin/post-new.php1,527 ▼717.66 ▼5.37646.88 ▼66.8958.20 ▼6.76
Media Library /wp-admin/upload.php1,401 ▲134.20 ▲0.0396.90 ▼13.8442.45 ▼6.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/show-all-comments-in-one-page/bt-comments.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-2.png) image missing
The official readme.txt is a good inspiration

show-all-comments-in-one-page/bt-comments.php 92% from 13 tests

Analyzing the main PHP file in "Show All Comments" version 7.0.1
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("show-all-comments-in-one-page.php" instead of "bt-comments.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
Success! There were no dangerous files found in this plugin621 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP111427555
JavaScript18038
CSS20028

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.26MB with 0.19MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png132.48KB42.13KB▼ 68.20%
screenshot-1.png135.72KB35.53KB▼ 73.82%