Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.12MB] [CPU: ▼3.65ms] Passed 4 tests
A check of server-side resources used by Comment Guardian – Remove Comment Spam by Language Detection
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.11 | 40.57 ▼0.18 |
Dashboard /wp-admin | 3.42 ▲0.11 | 52.74 ▼4.92 |
Posts /wp-admin/edit.php | 3.53 ▲0.17 | 54.89 ▲1.09 |
Add New Post /wp-admin/post-new.php | 6.02 ▲0.13 | 85.37 ▼10.58 |
Media Library /wp-admin/upload.php | 3.34 ▲0.11 | 37.94 ▲2.13 |
Comment Guardian /wp-admin/options-general.php?page=comment-guardian-options | 3.31 | 35.36 |
Server storage [IO: ▲2.49MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 266 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
cg_version |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Comment Guardian – Remove Comment Spam by Language Detection
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,841 ▲70 | 13.21 ▼1.17 | 4.45 ▲2.51 | 41.73 ▲0.20 |
Dashboard /wp-admin | 2,208 ▲20 | 5.83 ▼0.08 | 101.08 ▼7.15 | 39.15 ▼8.35 |
Posts /wp-admin/edit.php | 2,097 ▲11 | 2.05 ▲0.04 | 39.77 ▲3.40 | 34.74 ▲0.54 |
Add New Post /wp-admin/post-new.php | 1,538 ▲24 | 23.19 ▲5.55 | 673.31 ▼19.94 | 64.85 ▲6.75 |
Media Library /wp-admin/upload.php | 1,396 ▲14 | 4.19 ▲0.04 | 97.47 ▼4.73 | 45.80 ▼0.81 |
Comment Guardian /wp-admin/options-general.php?page=comment-guardian-options | 1,296 | 1.87 | 28.21 | 35.67 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- cg_version
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 5× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/comment-guardian/includes/class-comment-guardian-activator.php:23
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/comment-guardian/admin/partials/comment-guardian-admin-display.php:19
- > PHP Fatal error
Uncaught Error: Interface 'LanguageDetection\\Tokenizer\\TokenizerInterface' not found in wp-content/plugins/comment-guardian/includes/LanguageDetection/Tokenizer/WhitespaceTokenizer.php:15
- > PHP Fatal error
Uncaught Error: Class 'LanguageDetection\gramParser' not found in wp-content/plugins/comment-guardian/includes/LanguageDetection/Trainer.php:15
- > PHP Fatal error
Uncaught Error: Class 'LanguageDetection\gramParser' not found in wp-content/plugins/comment-guardian/includes/LanguageDetection/Language.php:14
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration Passed 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
4 plugin tags: spam protection, spam, remove spam, comments
comment-guardian/comment-guardian.php Passed 13 tests
"Comment Guardian – Remove Comment Spam by Language Detection" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
113 characters long description:
Comment Guardian is an innovative and intelligent spam protection that eliminates comment spam 99.9% of the time.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin37,562 lines of code in 139 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 130 | 309 | 621 | 36,933 |
PO File | 4 | 48 | 44 | 209 |
JavaScript | 2 | 22 | 1 | 190 |
Sass | 1 | 2 | 0 | 83 |
CSS | 1 | 16 | 1 | 82 |
Markdown | 1 | 4 | 0 | 65 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 4.83 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 15.00 |
Average method complexity | 1.88 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 1 | 9.09% |
▷ Concrete classes | 10 | 90.91% |
▷ Final classes | 0 | 0.00% |
Methods | 53 | |
▷ Static methods | 2 | 3.77% |
▷ Public methods | 46 | 86.79% |
▷ Protected methods | 1 | 1.89% |
▷ Private methods | 6 | 11.32% |
Functions | 4 | |
▷ Named functions | 2 | 50.00% |
▷ Anonymous functions | 2 | 50.00% |
Constants | 2 | |
▷ Global constants | 1 | 50.00% |
▷ Class constants | 1 | 50.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/img/comment-guardian.png | 96.63KB | 59.33KB | ▼ 38.60% |