84% private-comment

Code Review | Private Comment

WordPress plugin Private Comment scored84%from 54 tests.

About plugin

  • Plugin page: private-comment
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Feb 22, 2022
  • Latest release: Aug 10, 2023
  • Number of updates: 9
  • Update frequency: every 59.3 days
  • Top authors: edersonpeka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /573 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.48ms] Passed 4 tests

Server-side resources used by Private Comment
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.16 ▼5.40
Dashboard /wp-admin3.37 ▲0.0646.19 ▼5.35
Posts /wp-admin/edit.php3.42 ▲0.0648.50 ▼0.89
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.49 ▼6.26
Media Library /wp-admin/upload.php3.29 ▲0.0636.04 ▲2.76

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Private Comment
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▲0.091.61 ▼0.1138.03 ▼4.64
Dashboard /wp-admin2,198 ▲185.59 ▼0.0793.57 ▲1.5741.45 ▼1.16
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0135.57 ▼0.8831.07 ▼6.50
Add New Post /wp-admin/post-new.php1,526 ▼223.53 ▲0.29670.00 ▼2.3551.14 ▲0.09
Media Library /wp-admin/upload.php1,403 ▲124.15 ▼0.05102.92 ▼5.4441.40 ▼4.44

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/private-comment/private-comment.php:248

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: private, comments, message

private-comment/private-comment.php Passed 13 tests

"Private Comment" version 0.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
81 characters long description:
Allow commenters to choose restrict their comments exhibition only to site owners

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin242 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11741192
PO File1111728
Markdown112022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity36.00
▷ Minimum class complexity36.00
▷ Maximum class complexity36.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods17100.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin