84% ai-disable-comments

Code Review | AI Disable Comments

WordPress plugin AI Disable Comments scored84%from 54 tests.

About plugin

  • Plugin page: ai-disable-comments
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Apr 19, 2013
  • Latest release: Apr 23, 2013
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: Andon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,118 total downloads


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
Install script ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.13ms] Passed 4 tests

This is a short check of server-side resources used by AI Disable Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.45 ▲1.07
Dashboard /wp-admin3.31 ▼0.0448.93 ▼11.10
Posts /wp-admin/edit.php3.36 ▲0.0048.51 ▲0.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.36 ▼17.54
Media Library /wp-admin/upload.php3.23 ▲0.0031.29 ▼4.23

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by AI Disable Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.45 ▲0.161.72 ▼0.1043.79 ▲3.64
Dashboard /wp-admin2,224 ▲334.85 ▼1.2195.84 ▼2.4281.32 ▲37.27
Posts /wp-admin/edit.php2,104 ▲152.01 ▲0.0438.36 ▼1.7334.09 ▲0.76
Add New Post /wp-admin/post-new.php1,527 ▲823.29 ▲0.24754.76 ▲96.3352.33 ▼3.81
Media Library /wp-admin/upload.php1,403 ▲184.18 ▲0.0395.43 ▼21.5167.53 ▲20.18

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ai-disable-comments/ai-disable-comments.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (AIDC Settings page with all options.)
The official readme.txt is a good inspiration

ai-disable-comments/ai-disable-comments.php Passed 13 tests

The main PHP file in "AI Disable Comments" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
102 characters long description:
A quick way to disable or delete all approved, pending or spam comments and pings only with one click.

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 plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ 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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png3.22KB0.71KB▼ 77.92%
screenshot-1.png38.31KB14.12KB▼ 63.16%