79% comment-link-moderation-whitelist

Code Review | Comment Link Moderation Whitelist

WordPress plugin Comment Link Moderation Whitelist scored 79% from 54 tests.

About plugin

  • Plugin page: comment-link-mode...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Jan 28, 2018
  • Latest release: May 13, 2020
  • Number of updates: 6
  • Update frequency: every 139.3 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,080 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.35ms] Passed 4 tests

An overview of server-side resources used by Comment Link Moderation Whitelist
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.64 ▼6.35
Dashboard /wp-admin3.34 ▲0.0345.11 ▼0.69
Posts /wp-admin/edit.php3.39 ▲0.0346.75 ▼5.89
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.15 ▲6.39
Media Library /wp-admin/upload.php3.26 ▲0.0336.54 ▲3.55

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Comment Link Moderation Whitelist
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.131.57 ▼0.1037.17 ▼3.95
Dashboard /wp-admin2,203 ▲125.77 ▼0.1397.72 ▼1.8139.79 ▼1.77
Posts /wp-admin/edit.php2,089 ▼01.98 ▼0.0836.41 ▼1.6836.70 ▲1.69
Add New Post /wp-admin/post-new.php1,533 ▼023.02 ▼0.05642.99 ▼53.8854.85 ▲2.92
Media Library /wp-admin/upload.php1,391 ▲34.22 ▼0.0294.47 ▼17.3341.76 ▼6.34

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/comment-link-moderation-whitelist/tests/bootstrap.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/comment-link-moderation-whitelist/tests/bootstrap.php on line 17
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/comment-link-moderation-whitelist/tests/bootstrap.php on line 17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
4 plugin tags: coffee2code, comment, comment_max_links, moderation

comment-link-moderation-whitelist/comment-link-moderation-whitelist.php Passed 13 tests

The entry point to "Comment Link Moderation Whitelist" version 1.1.3 is a PHP file that has certain tags in its header comment area
98 characters long description:
Allows for whitelisted URLs to not count against the comment moderation max number of links limit.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected304 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4100136230
Markdown220039
Bourne Shell16221
XML10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.00
▷ Minimum class complexity5.00
▷ Maximum class complexity11.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods621.43%
▷ Public methods2589.29%
▷ Protected methods00.00%
▷ Private methods310.71%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin