84% auto-approve-comments

Code Review | Auto Approve Comments

WordPress plugin Auto Approve Comments scored84%from 54 tests.

About plugin

  • Plugin page: auto-approve-comm...
  • Plugin version: 2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 6.3.1
  • First release: Dec 3, 2015
  • Latest release: Jun 15, 2021
  • Number of updates: 38
  • Update frequency: every 53.2 days
  • Top authors: fedeandri (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /8,498 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Auto Approve Comments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.57 ▲5.63
Dashboard /wp-admin3.38 ▲0.0847.96 ▲2.69
Posts /wp-admin/edit.php3.50 ▲0.1448.29 ▲7.74
Add New Post /wp-admin/post-new.php5.96 ▲0.0886.72 ▼16.44
Media Library /wp-admin/upload.php3.31 ▲0.0834.33 ▲0.70
All Comments /wp-admin/edit-comments.php3.3739.51
Auto Approve Comments /wp-admin/edit-comments.php?page=auto-approve-comments3.3426.68

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Auto Approve Comments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8214.73 ▼0.021.78 ▲0.1444.79 ▲7.29
Dashboard /wp-admin2,220 ▲315.79 ▲0.87107.98 ▼23.2040.39 ▼5.89
Posts /wp-admin/edit.php2,109 ▲202.00 ▲0.0238.41 ▼10.0032.06 ▼2.81
Add New Post /wp-admin/post-new.php1,548 ▲517.71 ▼0.38702.74 ▲67.9564.14 ▲9.37
Media Library /wp-admin/upload.php1,402 ▲114.38 ▲0.1998.78 ▼4.3740.80 ▼2.19
All Comments /wp-admin/edit-comments.php1,8092.2834.0032.24
Auto Approve Comments /wp-admin/edit-comments.php?page=auto-approve-comments1,0891.8628.2330.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/auto-approve-comments/views/settings-page.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Commenters tab), #2 (Users tab), #3 (Roles tab)
The official readme.txt is a good inspiration

auto-approve-comments/auto-approve-comments.php Passed 13 tests

Analyzing the main PHP file in "Auto Approve Comments" version 2.8
80 characters long description:
Auto approve new comments based on commenter (email/name/url), username or role.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin731 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP317629432
JavaScript5630185
CSS1220114

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1365.00%
▷ Protected methods00.00%
▷ Private methods735.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.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