Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
- The plugin cannot be installed
- > Warning in wp-content/plugins/shane-web-guy-portfolio/swg-portfolio.php+12
Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH' (this will throw an Error in a future version of PHP)
Server metrics [RAM: ▼1.95MB] [CPU: ▼54.55ms] Passed 4 tests
This is a short check of server-side resources used by Author URI: http://www.shanewebguy.com/
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.04 ▼1.42 | 4.55 ▼30.55 |
Dashboard /wp-admin | 2.06 ▼1.28 | 5.61 ▼53.72 |
Posts /wp-admin/edit.php | 2.06 ▼1.29 | 5.96 ▼38.00 |
Add New Post /wp-admin/post-new.php | 2.06 ▼3.82 | 5.39 ▼95.93 |
Media Library /wp-admin/upload.php | 2.06 ▼1.17 | 5.56 ▼26.42 |
Settings /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings | 2.06 | 5.77 |
SWGP Categories /wp-admin/edit-tags.php?taxonomy=swg_cats&post_type=swgportfolio | 2.08 | 5.69 |
All Items /wp-admin/edit.php?post_type=swgportfolio | 2.08 | 5.22 |
Add New /wp-admin/post-new.php?post_type=swgportfolio | 2.08 | 7.01 |
Server storage [IO: ▲4.81MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 91 new files
Database: no new tables, 23 new options
New WordPress options |
---|
widget_recent-comments |
swgPreviewTextTitleLabel |
swgPreviewTextTitleWeight |
widget_theysaidso_widget |
swgpBtnTitle |
swgPreviewTextFontColor |
swgPreviewTextDescriptionLabel |
swgPreviewTextTagLabel |
swgPreviewTextPadding |
swgpBtnFontSize |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Author URI: http://www.shanewebguy.com/
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,965 ▲219 | 13.56 ▼0.79 | 5.69 ▲4.03 | 41.55 ▼1.32 |
Dashboard /wp-admin | 2,238 ▲49 | 5.80 ▲0.86 | 101.84 ▼10.42 | 38.83 ▼4.98 |
Posts /wp-admin/edit.php | 2,124 ▲38 | 2.14 ▲0.12 | 39.37 ▲4.45 | 35.50 ▲4.56 |
Add New Post /wp-admin/post-new.php | 1,543 ▲15 | 17.71 ▼5.41 | 667.75 ▼15.08 | 53.87 ▲5.52 |
Media Library /wp-admin/upload.php | 1,423 ▲32 | 4.24 ▲0.08 | 100.87 ▲1.47 | 43.55 ▼2.02 |
Settings /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings | 1,319 | 1.92 | 35.28 | 41.80 |
SWGP Categories /wp-admin/edit-tags.php?taxonomy=swg_cats&post_type=swgportfolio | 1,517 | 3.29 | 50.18 | 27.38 |
All Items /wp-admin/edit.php?post_type=swgportfolio | 1,131 | 1.96 | 30.52 | 28.66 |
Add New /wp-admin/post-new.php?post_type=swgportfolio | 2,640 | 7.84 | 171.00 | 67.69 |
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
It is recommended to fix the following
- This plugin did not uninstall without warnings or errors
- > Warning in wp-content/plugins/shane-web-guy-portfolio/swg-portfolio.php+12
Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH' (this will throw an Error in a future version of PHP)
- This plugin did not uninstall successfully, leaving 23 options in the database
- swgPreviewTextFontSize
- db_upgraded
- swgpreviewBackgroundColor
- swgpreviewPadding
- swgPreviewTextTitleAlign
- swgpBtnTitle
- swgpBtnFontColor
- widget_recent-comments
- theysaidso_admin_options
- swgpBtnBackgroundColor
- ...
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
- 5 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=swgportfolio
- > Warning in wp-content/plugins/shane-web-guy-portfolio/swg-portfolio.php+12
Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH' (this will throw an Error in a future version of PHP)
- 5 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=swgportfolio
- > Warning in wp-content/plugins/shane-web-guy-portfolio/swg-portfolio.php+13
Use of undefined constant PLUGIN_URL - assumed 'PLUGIN_URL' (this will throw an Error in a future version of PHP)
- 5 occurences, only the last one shown
- > GET request to /wp-admin/edit-tags.php?taxonomy=swg_cats&post_type=swgportfolio
- > Warning in wp-content/plugins/shane-web-guy-portfolio/lib/Tax-meta-class/Tax-meta-class.php+717
Illegal string offset 'url'
- 3 occurences, only the last one shown
- > GET request to /wp-admin/edit-tags.php?taxonomy=swg_cats&post_type=swgportfolio
- > Warning in wp-content/plugins/shane-web-guy-portfolio/lib/Tax-meta-class/Tax-meta-class.php+706
Cannot assign an empty string to a string offset
- 2 occurences, only the last one shown
- > GET request to /wp-admin/edit-tags.php?taxonomy=swg_cats&post_type=swgportfolio
- > Warning in wp-content/plugins/shane-web-guy-portfolio/lib/Tax-meta-class/Tax-meta-class.php+716
Illegal string offset 'id'
- 4 occurences, only the last one shown
- > GET request to /wp-admin/edit-tags.php?taxonomy=swg_cats&post_type=swgportfolio
- > Notice in wp-content/plugins/shane-web-guy-portfolio/lib/Tax-meta-class/Tax-meta-class.php+717
Uninitialized string offset: 0
- > GET request to /wp-admin/post-new.php?post_type=swgportfolio
- > Notice in wp-content/plugins/shane-web-guy-portfolio/app/models/metabox.php+90
Undefined index: swg_info_nonce
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/shane-web-guy-portfolio/index.php
- 14× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shane-web-guy-portfolio/app/models/css.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/shane-web-guy-portfolio/swg-portfolio.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/shane-web-guy-portfolio/app/init.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shane-web-guy-portfolio/app/models/variables.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shane-web-guy-portfolio/app/views/admin/form.php:7
- > PHP Warning
Use of undefined constant PLUGIN_PATH - assumed 'PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shane-web-guy-portfolio/swg-portfolio.php on line 12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shane-web-guy-portfolio/app/controllers/portfolioController.php:8
- > PHP Fatal error
Uncaught Error: Class 'SWG_Portfolio' not found in wp-content/plugins/shane-web-guy-portfolio/app/views/admin/adminPage.php:3
- > PHP Warning
require(PLUGIN_PATH/lib/Tax-meta-class/Tax-meta-class.php): failed to open stream: No such file or directory in wp-content/plugins/shane-web-guy-portfolio/app/models/settings.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/shane-web-guy-portfolio/app/models/metabox.php:6
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
- > GET request to /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings
- > Network (severe)
wp-content/plugins/swg-portfolio//public/assets/bootstrap/css/bootstrap.min.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings
- > Network (severe)
wp-content/plugins/swg-portfolio//public/assets/color-picker/css/bootstrap-colorpicker.min.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings
- > Network (severe)
wp-content/plugins/swg-portfolio//public/assets/font-awesome-4.5.0/css/font-awesome.min.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings
- > Network (severe)
wp-content/plugins/swg-portfolio//public/css/admin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings
- > Network (severe)
wp-content/plugins/swg-portfolio//public/js/admin.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings
- > Network (severe)
wp-content/plugins/swg-portfolio//public/assets/color-picker/js/bootstrap-colorpicker.min.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/edit.php?post_type=swgportfolio&page=swgp_settings
- > Network (severe)
wp-content/plugins/swg-portfolio//public/img/portfoliopointer-250x300.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/edit-tags.php?taxonomy=swg_cats&post_type=swgportfolio
- > Deprecation (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
Optimizations
Plugin configuration 79% from 29 tests
readme.txt 75% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== Author URI: http://www.shanewebguy.com/===
) - Contributors: Plugin contributors field is missing
- Tags: Please delete some tags, you are using 12 tag instead of maximum 10
- Donate link: Invalid URI ("")
shane-web-guy-portfolio/swg-portfolio.php 85% from 13 tests
"Author URI: http://www.shanewebguy.com/" version 2.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Description: Please keep the plugin description shorter than 140 characters (currently 308 characters long)
- Main file name: The principal plugin file should be the same as the plugin slug ("shane-web-guy-portfolio.php" instead of "swg-portfolio.php")
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
Good job! No executable or dangerous file extensions detected12,294 lines of code in 48 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 18 | 149 | 137 | 5,829 |
JavaScript | 12 | 709 | 444 | 4,068 |
PHP | 14 | 280 | 794 | 1,673 |
SVG | 2 | 0 | 0 | 656 |
PO File | 2 | 18 | 22 | 68 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 54.50 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 189.00 |
Average method complexity | 3.58 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 28.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 83 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 83 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 17 | |
▷ Named functions | 17 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.94MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/Tax-meta-class/images/delete-16.png | 1.74KB | 0.90KB | ▼ 48.23% |
public/img/arrow-left.png | 0.38KB | 0.19KB | ▼ 49.35% |
public/assets/color-picker/img/bootstrap-colorpicker/hue.png | 2.90KB | 0.50KB | ▼ 82.71% |
public/assets/color-picker/img/bootstrap-colorpicker/alpha.png | 3.19KB | 1.68KB | ▼ 47.45% |
public/assets/color-picker/img/bootstrap-colorpicker/saturation.png | 8.61KB | 5.13KB | ▼ 40.41% |