Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.28ms] Passed 4 tests
Analyzing server-side resources used by Spam Captcha
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 43.46 ▼1.90 |
Dashboard /wp-admin | 3.31 ▲0.00 | 59.36 ▲7.29 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 54.36 ▼2.40 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 98.16 ▼8.10 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 38.40 ▼0.72 |
Server storage [IO: ▲2.60MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 208 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_pluginSL_spam_captcha |
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_recent-posts |
db_upgraded |
spam_captcha_options |
Browser metrics Passed 4 tests
Checking browser requirements for Spam Captcha
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.24 ▼0.12 | 1.93 ▼0.15 | 46.00 ▲0.13 |
Dashboard /wp-admin | 2,195 ▲18 | 5.56 ▼0.14 | 89.65 ▼19.58 | 46.12 ▼20.19 |
Posts /wp-admin/edit.php | 2,103 ▼0 | 2.02 ▼0.01 | 42.13 ▼1.42 | 39.04 ▲0.72 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 23.18 ▲0.36 | 678.52 ▲38.89 | 58.98 ▲3.82 |
Media Library /wp-admin/upload.php | 1,397 ▼3 | 4.23 ▲0.04 | 103.67 ▼4.28 | 45.97 ▲1.69 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Deprecated in wp-includes/class-wp-hook.php+310
Non-static method spam_captcha::uninstall_removedata() should not be called statically
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 3× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/spam-captcha/spam-captcha.php
- > /wp-content/plugins/spam-captcha/core.php
- > /wp-content/plugins/spam-captcha/core.class.php
- 2× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
require_once(): Failed opening required 'core.php' (include_path='.:/usr/share/php') in wp-content/plugins/spam-captcha/core/templates/my-plugin.php on line 18
- > PHP Warning
require_once(core.php): failed to open stream: No such file or directory in wp-content/plugins/spam-captcha/core/templates/my-plugin.php on line 18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 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
Attributes that need to be fixed:
- Screenshots: These screenshots require images: #1 (The result page), #2 (The configuration page of the plugin), #3 (An error when mistyping a captcha), #4 (An error when detecting a spam), #5 (Spam Report)
spam-captcha/spam-captcha.php 92% from 13 tests
The main PHP script in "Spam Captcha" version 1.4.3 is automatically included on every request by WordPress
You should first fix the following items:
- Description: Please keep the plugin description shorter than 140 characters (currently 541 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected19,614 lines of code in 92 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 51 | 4,903 | 0 | 10,878 |
PHP | 19 | 1,013 | 1,813 | 7,368 |
JavaScript | 7 | 206 | 241 | 782 |
CSS | 11 | 85 | 13 | 471 |
Markdown | 1 | 20 | 0 | 84 |
JSON | 1 | 0 | 0 | 29 |
INI | 2 | 0 | 0 | 2 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
- Method cyclomatic complexity has to be reduced to less than 100 (currently 119)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 54.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 211.00 |
Average method complexity | 7.39 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 119.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 19 | |
▷ Abstract classes | 1 | 5.26% |
▷ Concrete classes | 18 | 94.74% |
▷ Final classes | 0 | 0.00% |
Methods | 159 | |
▷ Static methods | 35 | 22.01% |
▷ Public methods | 156 | 98.11% |
▷ Protected methods | 3 | 1.89% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
39 PNG files occupy 0.66MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/banner-772x250.png | 77.83KB | 23.53KB | ▼ 69.77% |
core/img/tree_lastnode.png | 0.14KB | 0.10KB | ▼ 27.78% |
core/img/warning.png | 4.46KB | 1.51KB | ▼ 66.10% |
img/error.png | 4.24KB | 1.48KB | ▼ 65.18% |
img/icon-256x256.png | 47.72KB | 17.72KB | ▼ 62.87% |