Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.23MB] [CPU: ▼4.00ms] Passed 4 tests
Analyzing server-side resources used by HateDetect
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.12 | 41.88 ▼3.87 |
Dashboard /wp-admin | 3.57 ▲0.27 | 53.22 ▼2.04 |
Posts /wp-admin/edit.php | 3.68 ▲0.33 | 57.94 ▲7.33 |
Add New Post /wp-admin/post-new.php | 6.15 ▲0.26 | 96.46 ▼8.53 |
Media Library /wp-admin/upload.php | 3.49 ▲0.26 | 38.56 ▼1.54 |
HateDetect /wp-admin/options-general.php?page=hatedetect-key-config | 3.46 | 37.23 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
hatedetect_key_status |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for HateDetect
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,862 ▲116 | 14.27 ▲0.01 | 1.71 ▼0.38 | 33.04 ▼10.07 |
Dashboard /wp-admin | 2,240 ▲63 | 5.65 ▲0.02 | 93.27 ▼6.14 | 43.99 ▼2.79 |
Posts /wp-admin/edit.php | 2,104 ▲7 | 2.14 ▲0.11 | 40.75 ▲2.62 | 33.80 ▼1.84 |
Add New Post /wp-admin/post-new.php | 1,529 ▲1 | 23.78 ▲0.52 | 668.32 ▼30.29 | 52.36 ▼0.82 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.21 ▼0.05 | 101.20 ▼12.40 | 42.74 ▼5.52 |
HateDetect /wp-admin/options-general.php?page=hatedetect-key-config | 869 | 2.04 | 24.44 | 33.08 |
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
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/hatedetect/HateDetect.php
- 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Notice
Undefined variable: type in wp-content/plugins/hatedetect/views/notice.php on line 42
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/hatedetect/views/title.php:2
- > PHP Notice
Undefined variable: type in wp-content/plugins/hatedetect/views/notice.php on line 22
- > PHP Notice
Undefined variable: type in wp-content/plugins/hatedetect/views/notice.php on line 61
- > PHP Notice
Undefined variable: type in wp-content/plugins/hatedetect/views/notice.php on line 73
- > PHP Notice
Undefined variable: type in wp-content/plugins/hatedetect/views/notice.php on line 7
- > PHP Notice
Undefined variable: type in wp-content/plugins/hatedetect/views/notice.php on line 69
- > PHP Notice
Undefined variable: type in wp-content/plugins/hatedetect/views/notice.php on line 49
- > PHP Notice
Undefined variable: type in wp-content/plugins/hatedetect/views/notice.php on line 65
- > PHP Fatal error
Uncaught Error: Class 'Hatedetect_Admin' not found in wp-content/plugins/hatedetect/views/start.php:16
- > PHP Notice
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)
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: anti hate, antihate, hatedetect, hatecheck, hate-detection...
hatedetect/HateDetect.php 92% from 13 tests
The main file in "HateDetect" v. 0.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("hatedetect.php" instead of "HateDetect.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,042 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 9 | 255 | 348 | 1,418 |
CSS | 1 | 109 | 3 | 576 |
JavaScript | 1 | 15 | 6 | 48 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.45 |
Average class complexity | 68.33 |
▷ Minimum class complexity | 21.00 |
▷ Maximum class complexity | 101.00 |
Average method complexity | 4.67 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 55 | |
▷ Static methods | 55 | 100.00% |
▷ Public methods | 52 | 94.55% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 5.45% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 7 | |
▷ Global constants | 2 | 28.57% |
▷ Class constants | 5 | 71.43% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected