Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.02MB] [CPU: ▼8.16ms] Passed 4 tests
This is a short check of server-side resources used by If File Exists
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 39.93 ▼0.17 |
Dashboard /wp-admin | 3.33 ▲0.03 | 50.96 ▼5.23 |
Posts /wp-admin/edit.php | 3.38 ▲0.03 | 46.39 ▼5.90 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 85.69 ▼21.35 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 39.39 ▲1.55 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for If File Exists
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.25 ▼0.17 | 1.68 ▼0.03 | 43.75 ▲4.89 |
Dashboard /wp-admin | 2,198 ▲40 | 5.62 ▼0.04 | 86.85 ▼13.05 | 40.34 ▼5.75 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.99 ▼0.03 | 38.55 ▼0.52 | 37.81 ▼0.38 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.61 ▲0.44 | 656.19 ▼15.32 | 59.00 ▲3.87 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.16 ▼0.11 | 98.00 ▼10.23 | 41.73 ▼4.05 |
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
The following items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/if-file-exists/tests/phpunit/bootstrap.php
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/if-file-exists/tests/phpunit/bootstrap.php on line 29
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/if-file-exists/tests/phpunit/bootstrap.php on line 29
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: existence, file, coffee2code, filesystem, exists
if-file-exists/if-file-exists.php Passed 13 tests
The main file in "If File Exists" v. 2.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
103 characters long description:
Check if a file exists and return true/false or display a string containing information about the file.
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
Success! There were no dangerous files found in this plugin516 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
Markdown | 4 | 99 | 0 | 257 |
PHP | 4 | 71 | 182 | 224 |
Bourne Shell | 1 | 6 | 2 | 21 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 1.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 22 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 22 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin