84% avatar-spam-comments

Code Review | Avatar Spam Comments

WordPress plugin Avatar Spam Comments scored84%from 54 tests.

About plugin

  • Plugin page: avatar-spam-comments
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.6.1
  • WordPress version: 6.3.1
  • First release: Nov 15, 2013
  • Latest release: Nov 15, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: titopandub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /826 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Avatar Spam Comments
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.03 ▲1.95
Dashboard /wp-admin3.32 ▼0.0250.57 ▼5.39
Posts /wp-admin/edit.php3.37 ▲0.0242.69 ▼4.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.81 ▼20.17
Media Library /wp-admin/upload.php3.25 ▲0.0231.79 ▲0.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Avatar Spam Comments
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.75 ▲0.111.72 ▼0.0743.02 ▼2.14
Dashboard /wp-admin2,206 ▲154.86 ▼0.04103.78 ▼4.5945.93 ▼1.15
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0233.78 ▼7.1535.03 ▼4.47
Add New Post /wp-admin/post-new.php1,543 ▼018.32 ▼0.09647.59 ▼44.3555.06 ▼5.96
Media Library /wp-admin/upload.php1,391 ▲64.26 ▼0.1399.14 ▼2.5542.92 ▼5.77

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/avatar-spam-comments/avatar-spam-comments.php:194

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: comments

avatar-spam-comments/avatar-spam-comments.php 92% from 13 tests

The main PHP file in "Avatar Spam Comments" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected99 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1346199

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin