84% anonymous-comments

Code Review | Anonymous Comment

WordPress plugin Anonymous Comment scored84%from 54 tests.

About plugin

  • Plugin page: anonymous-comments
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.6
  • WordPress version: 6.3.1
  • First release: Jul 6, 2016
  • Latest release: Sep 27, 2016
  • Number of updates: 7
  • Update frequency: every 16.4 days
  • Top authors: pgogy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,093 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.86ms] Passed 4 tests

A check of server-side resources used by Anonymous Comment
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.72 ▲0.37
Dashboard /wp-admin3.35 ▲0.0545.43 ▲0.38
Posts /wp-admin/edit.php3.40 ▲0.0446.91 ▼0.83
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.79 ▼3.05
Media Library /wp-admin/upload.php3.27 ▲0.0432.30 ▼3.93

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Anonymous Comment
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.35 ▼0.961.86 ▲0.0642.09 ▼6.77
Dashboard /wp-admin2,251 ▲605.84 ▼0.06103.77 ▲1.3839.83 ▼2.92
Posts /wp-admin/edit.php2,105 ▲162.00 ▼0.0139.35 ▲1.1135.54 ▲3.67
Add New Post /wp-admin/post-new.php6,311 ▲4,77822.18 ▼1.06845.98 ▲164.5258.45 ▲2.58
Media Library /wp-admin/upload.php1,416 ▲284.19 ▼0.0495.82 ▼11.7141.53 ▼8.21

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/anonymous-comments/code/display/class-anonymous_comments_display.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anonymous-comments/code/config/class-anonymous_comments_config.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/anonymous-comments/code/config/class-anonymous_comments_config.php:6

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === anonymous-comments === )
The official readme.txt is a good inspiration

anonymous-comments/anonymous_comments.php 92% from 13 tests

The entry point to "Anonymous Comment" version 0.4 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("anonymous-comments.php" instead of "anonymous_comments.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected190 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3577190

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.88
Average class complexity27.00
▷ Minimum class complexity12.00
▷ Maximum class complexity42.00
Average method complexity6.20
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin