Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.49MB] [CPU: ▲4.14ms] Passed 4 tests
An overview of server-side resources used by Code Injection
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.98 ▲0.51 | 43.87 ▲6.19 |
Dashboard /wp-admin | 3.82 ▲0.52 | 50.87 ▼5.10 |
Posts /wp-admin/edit.php | 3.87 ▲0.51 | 54.55 ▲9.48 |
Add New Post /wp-admin/post-new.php | 6.37 ▲0.48 | 99.92 ▲8.56 |
Media Library /wp-admin/upload.php | 3.68 ▲0.45 | 38.23 ▲6.92 |
Code Injection /wp-admin/options-general.php?page=ci-general | 3.65 | 37.33 |
Server storage [IO: ▲0.16MB] [DB: ▲0.07MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 41 new files
Database: 1 new table, 9 new options
New tables |
---|
ci_activities |
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
widget_wp_code_injection_plugin_widget |
theysaidso_admin_options |
ci_db_version |
widget_recent-comments |
ci_role_version |
Browser metrics Passed 4 tests
Code Injection: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,860 ▲98 | 14.08 ▼0.63 | 1.95 ▲0.30 | 41.75 ▲0.70 |
Dashboard /wp-admin | 2,237 ▲60 | 5.61 ▼0.10 | 91.98 ▼10.98 | 42.33 ▼1.85 |
Posts /wp-admin/edit.php | 2,139 ▲39 | 2.05 ▲0.07 | 39.37 ▲2.61 | 34.91 ▲0.89 |
Add New Post /wp-admin/post-new.php | 6,237 ▲4,708 | 21.24 ▼1.90 | 904.50 ▲240.19 | 77.96 ▲23.57 |
Media Library /wp-admin/upload.php | 1,445 ▲42 | 4.22 ▲0.00 | 101.41 ▲3.93 | 41.77 ▼0.79 |
Code Injection /wp-admin/options-general.php?page=ci-general | 925 | 2.19 | 28.48 | 35.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 1 table in the database
- ci_activities
- This plugin did not uninstall successfully, leaving 9 options in the database
- ci_role_version
- widget_theysaidso_widget
- ci_db_version
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- widget_wp_code_injection_plugin_widget
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test
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
The following issues need your attention
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/code-injection/includes/class-widget.php:23
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: code, snippets, injection
code-injection/code-injection.php 92% from 13 tests
The main PHP script in "Code Injection" version 2.5.0 is automatically included on every request by WordPress
The following require your attention:
- Description: Please keep the plugin description shorter than 140 characters (currently 222 characters long)
Code Analysis Passed 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 detected2,814 lines of code in 35 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 16 | 835 | 833 | 1,609 |
CSS | 3 | 104 | 7 | 571 |
JavaScript | 6 | 118 | 30 | 345 |
SVG | 8 | 10 | 0 | 140 |
PO File | 1 | 61 | 69 | 135 |
Markdown | 1 | 11 | 0 | 14 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 15.85 |
▷ Minimum class complexity | 3.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 3.05 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 17.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 13 | 100.00% |
▷ Final classes | 12 | 92.31% |
Methods | 82 | |
▷ Static methods | 40 | 48.78% |
▷ Public methods | 70 | 85.37% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 12 | 14.63% |
Functions | 11 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 11 | 100.00% |
Constants | 9 | |
▷ Global constants | 4 | 44.44% |
▷ Class constants | 5 | 55.56% |
▷ Public constants | 5 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin