84% twpw-stop-remote-comments

Code Review | TWPW Stop Remote Comments

WordPress plugin TWPW Stop Remote Comments scored84%from 54 tests.

About plugin

  • Plugin page: twpw-stop-remote-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.3.1
  • WordPress version: 6.3.1
  • First release: Jun 11, 2012
  • Latest release: Jun 11, 2012
  • Number of updates: 7
  • Update frequency: every 6.1 days
  • Top authors: CharlyLeetham (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,223 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.69ms] Passed 4 tests

Server-side resources used by TWPW Stop Remote Comments
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.84 ▼1.06
Dashboard /wp-admin3.31 ▲0.0147.88 ▲1.45
Posts /wp-admin/edit.php3.36 ▲0.0042.30 ▼2.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.61 ▼8.79
Media Library /wp-admin/upload.php3.23 ▲0.0031.20 ▼2.42

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by TWPW Stop Remote Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.25 ▼1.151.91 ▲0.0843.89 ▼0.99
Dashboard /wp-admin2,206 ▲185.86 ▲0.0399.95 ▼11.6641.11 ▼1.37
Posts /wp-admin/edit.php2,092 ▲62.05 ▲0.0434.03 ▼1.2131.58 ▼2.92
Add New Post /wp-admin/post-new.php1,537 ▲2318.32 ▲0.69646.57 ▼59.1066.72 ▲12.24
Media Library /wp-admin/upload.php1,388 ▲34.17 ▼0.0497.67 ▼12.1044.31 ▼0.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twpw-stop-remote-comments/twpw-remote-comment-spam-blocker.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: spam, comments, remote comment spam

twpw-stop-remote-comments/twpw-remote-comment-spam-blocker.php 92% from 13 tests

"TWPW Stop Remote Comments" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("twpw-stop-remote-comments.php" instead of "twpw-remote-comment-spam-blocker.php")

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
Success! There were no dangerous files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12911

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin