Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼2.59ms] Passed 4 tests
Server-side resources used by Enable CORS
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 35.13 ▼7.33 |
Dashboard /wp-admin | 3.32 ▲0.02 | 44.74 ▼4.44 |
Posts /wp-admin/edit.php | 3.43 ▲0.08 | 47.08 ▼0.03 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 92.19 ▲8.47 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 37.34 ▲1.46 |
Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
It is recommended to fix the following issues
- You have illegally modified 1 file (1.18KB) outside of "wp-content/plugins/enable-cors/" and "wp-content/uploads/"
- (modified) .htaccess
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
Enable CORS: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,816 ▲81 | 13.29 ▼1.47 | 1.62 ▼0.18 | 41.48 ▼3.88 |
Dashboard /wp-admin | 2,222 ▲40 | 5.91 ▲0.06 | 108.32 ▲2.78 | 41.52 ▲1.54 |
Posts /wp-admin/edit.php | 2,105 ▲16 | 2.03 ▼0.02 | 39.76 ▲2.51 | 35.95 ▲2.55 |
Add New Post /wp-admin/post-new.php | 1,555 ▲19 | 18.40 ▼4.90 | 594.34 ▼43.97 | 53.87 ▲3.46 |
Media Library /wp-admin/upload.php | 1,407 ▲22 | 4.19 ▲0.00 | 95.62 ▼5.09 | 44.41 ▲1.31 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
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
Good news, no errors were detected
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 fix the following
- 2× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Trait 'Enable\\Cors\\Traits\\Singleton' not found in wp-content/plugins/enable-cors/src/Api/Support.php on line 13
- > PHP Fatal error
Trait 'Enable\\Cors\\Traits\\Singleton' not found in wp-content/plugins/enable-cors/src/Helpers/ToApi.php on line 7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: error, cors, enable, axios, fix...
enable-cors/enable-cors.php Passed 13 tests
The main file in "Enable CORS" v. 1.1.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
64 characters long description:
Enable Cross-Origin Resource Sharing for any or specific origin.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,369 lines of code in 27 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 23 | 289 | 722 | 1,357 |
JSON | 1 | 0 | 0 | 5 |
JavaScript | 1 | 2 | 11 | 5 |
CSS | 1 | 0 | 0 | 1 |
HTML | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.44 |
Average class complexity | 10.93 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 47.00 |
Average method complexity | 2.92 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 7 | |
Interfaces | 0 | |
Traits | 3 | |
Classes | 12 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 12 | 100.00% |
▷ Final classes | 8 | 66.67% |
Methods | 78 | |
▷ Static methods | 28 | 35.90% |
▷ Public methods | 66 | 84.62% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 12 | 15.38% |
Functions | 4 | |
▷ Named functions | 1 | 25.00% |
▷ Anonymous functions | 3 | 75.00% |
Constants | 16 | |
▷ Global constants | 5 | 31.25% |
▷ Class constants | 11 | 68.75% |
▷ Public constants | 11 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected