Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▼1.74MB] [CPU: ▼49.95ms] Passed 4 tests
This is a short check of server-side resources used by GitSwag
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.25 ▼1.22 | 8.59 ▼28.35 |
Dashboard /wp-admin | 2.27 ▼1.04 | 10.99 ▼44.65 |
Posts /wp-admin/edit.php | 2.27 ▼1.09 | 10.33 ▼32.27 |
Add New Post /wp-admin/post-new.php | 2.27 ▼3.62 | 10.07 ▼94.54 |
Media Library /wp-admin/upload.php | 2.27 ▼0.97 | 8.95 ▼25.94 |
GitSwag /wp-admin/options-general.php?page=gitswag | 2.27 | 10.05 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 86 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for GitSwag
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,799 ▲38 | 14.51 ▲0.15 | 1.73 ▲0.09 | 44.00 ▼0.16 |
Dashboard /wp-admin | 2,201 ▲24 | 5.55 ▼0.06 | 80.43 ▼4.88 | 39.40 ▼3.64 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.98 ▲0.03 | 39.01 ▼4.42 | 34.92 ▼3.66 |
Add New Post /wp-admin/post-new.php | 1,531 ▼1 | 23.22 ▲0.24 | 660.28 ▲57.55 | 64.75 ▲14.42 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.19 ▲0.02 | 98.70 ▼9.30 | 42.72 ▼5.26 |
GitSwag /wp-admin/options-general.php?page=gitswag | 838 | 1.99 | 25.07 | 26.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- Uninstall procedure had uncaught errors
- > User notice in wp-includes/functions.php+5905
Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the css_gitswag handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=gitswag
- > User notice in wp-includes/functions.php+5905
Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the css_gitswag handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=gitswag
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the css_gitswag handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- > GET request to /wp-admin/options-general.php?page=gitswag
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=gitswag
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=gitswag
- > Notice in wp-content/plugins/gitswag/Admin.php+153
Trying to get property 'user_login' of non-object
- > GET request to /wp-admin/options-general.php?page=gitswag
- > Deprecated in wp-content/plugins/gitswag/Admin.php+294
stripos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior
- > GET request to /wp-admin/options-general.php?page=gitswag
- > Notice in wp-includes/formatting.php+1104
Array to string conversion
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
- 12× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Warning
require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/gitswag/Preflight.php on line 3
- > PHP Warning
include(Parsedown.php): failed to open stream: No such file or directory in wp-content/plugins/gitswag/vendor/erusev/parsedown/tests/Test.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/gitswag/vendor/erusev/parsedown/tests/Test.php:5
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/gitswag/Preflight.php on line 3
- > PHP Warning
require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/gitswag/Preflight.php on line 3
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gitswag/Preflight.php on line 3
- > PHP Warning
include(): Failed opening 'Parsedown.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/gitswag/vendor/erusev/parsedown/tests/Test.php on line 3
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/gitswag/Preflight.php on line 3
- > PHP Warning
require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/gitswag/Preflight.php on line 3
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gitswag/Preflight.php on line 3
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: github
gitswag/GitSwag.php 85% from 13 tests
The main file in "GitSwag" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
- Git Repository: A Git repository was detected inside this plugin
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gitswag.php" instead of "GitSwag.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,074 lines of code in 80 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 707 | 215 | 1,558 |
HTML | 31 | 2 | 0 | 179 |
Markdown | 32 | 99 | 0 | 171 |
CSS | 1 | 32 | 0 | 86 |
JSON | 3 | 0 | 0 | 66 |
XML | 1 | 0 | 0 | 8 |
YAML | 1 | 1 | 0 | 6 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 36.25 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 115.00 |
Average method complexity | 7.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 79.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 46 | |
▷ Static methods | 3 | 6.52% |
▷ Public methods | 41 | 89.13% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 10.87% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 1 | 100.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected