84% yoast-comment-hacks

Code Review | Comment Hacks

WordPress plugin Comment Hacks scored84%from 54 tests.

About plugin

  • Plugin page: yoast-comment-hacks
  • Plugin version: 1.9.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2015
  • Latest release: Apr 6, 2023
  • Number of updates: 44
  • Update frequency: every 65.9 days
  • Top authors: joostdevalk (65.91%)Yoast (29.55%)ireneyoast (6.82%)atimmer (4.55%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /53,504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.29MB] [CPU: ▲0.08ms] Passed 4 tests

An overview of server-side resources used by Comment Hacks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2244.08 ▲0.18
Dashboard /wp-admin3.66 ▲0.3551.72 ▲0.52
Posts /wp-admin/edit.php3.71 ▲0.3550.20 ▲3.85
Add New Post /wp-admin/post-new.php6.18 ▲0.2990.55 ▼2.74
Media Library /wp-admin/upload.php3.52 ▲0.2938.88 ▲2.34
Comment Hacks /wp-admin/options-general.php?page=yoast-comment-hacks3.5537.45

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 153 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
yoast_comment_hacks
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Comment Hacks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.35 ▲0.001.98 ▲0.1648.02 ▲2.33
Dashboard /wp-admin2,208 ▲285.64 ▼0.0292.62 ▲0.2941.64 ▲0.29
Posts /wp-admin/edit.php2,104 ▲71.96 ▼0.0435.38 ▼1.5438.05 ▼1.12
Add New Post /wp-admin/post-new.php6,241 ▲4,71526.29 ▲3.31927.51 ▲311.6455.69 ▲6.97
Media Library /wp-admin/upload.php1,398 ▼24.15 ▼0.0296.47 ▼13.2040.99 ▼1.61
Comment Hacks /wp-admin/options-general.php?page=yoast-comment-hacks1,4652.0627.1733.96

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
  • 105× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'JoostBlog\\WP\\Comment\\Inc\\Hacks' not found in wp-content/plugins/yoast-comment-hacks/admin/views/config-page.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/WinterInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/yoast-comment-hacks/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: spam, emails, comments

yoast-comment-hacks/yoast-comment-hacks.php Passed 13 tests

The main PHP script in "Comment Hacks" version 1.9.2 is automatically included on every request by WordPress
95 characters long description:
Make comments management easier by applying the simple hacks Joost has gathered over the years.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,497 lines of code in 137 files:
LanguageFilesBlank linesComment linesLines of code
PHP1267541,4183,954
JSON300356
YAML3313123
Markdown18033
JavaScript272729
CSS2022

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity3.41
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes122
▷ Abstract classes10.82%
▷ Concrete classes12199.18%
▷ Final classes00.00%
Methods201
▷ Static methods2110.45%
▷ Public methods13969.15%
▷ Protected methods3416.92%
▷ Private methods2813.93%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants8
▷ Global constants337.50%
▷ Class constants562.50%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected