68% reportcomments

Code Review | Report Comments

WordPress plugin Report Comments scored68%from 54 tests.

About plugin

  • Plugin page: reportcomments
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2013
  • Latest release: May 7, 2013
  • Number of updates: 15
  • Update frequency: every 6.3 days
  • Top authors: lefalque (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

20+ active /2,259 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.97MB] [CPU: ▼61.93ms] Passed 4 tests

An overview of server-side resources used by Report Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.19 ▼40.24
Dashboard /wp-admin2.05 ▼1.3010.93 ▼57.74
Posts /wp-admin/edit.php2.05 ▼1.316.64 ▼44.46
Add New Post /wp-admin/post-new.php2.05 ▼3.846.54 ▼105.29
Media Library /wp-admin/upload.php2.05 ▼1.186.23 ▼27.67
All Comments /wp-admin/edit-comments.php2.058.56
Reported0 /wp-admin/edit-comments.php?page=report_comments_reported2.058.17

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Report Comments
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲16713.83 ▼0.488.55 ▲6.8843.88 ▲0.06
Dashboard /wp-admin2,220 ▲455.58 ▼0.1387.53 ▼24.9538.41 ▼3.33
Posts /wp-admin/edit.php2,125 ▲252.03 ▲0.0438.65 ▼2.5532.39 ▼3.16
Add New Post /wp-admin/post-new.php1,549 ▲2323.59 ▲0.48645.23 ▼19.0054.38 ▼0.64
Media Library /wp-admin/upload.php1,428 ▲314.29 ▲0.0796.27 ▼1.7543.72 ▲1.66
All Comments /wp-admin/edit-comments.php1,8362.2640.3634.16
Reported0 /wp-admin/edit-comments.php?page=report_comments_reported8082.0325.6326.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the report_comments_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php?page=report_comments_reported
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the report_comments_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/reportcomments/reportcomments.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/reportcomments/pages/comments-list.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: comments, ajax, admin

reportcomments/reportcomments.php 92% from 13 tests

"Report Comments" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 221 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin289 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP23571210
PO File2181864
JavaScript10015

PHP code Passed 2 tests

An short overview of 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.27
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1178.57%
▷ Protected methods00.00%
▷ Private methods321.43%
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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin