Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.07MB] [CPU: ▼10.33ms] Passed 4 tests
Analyzing server-side resources used by EM Purchase Code Validator
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.52 ▲0.05 | 23.58 ▼13.63 |
Dashboard /wp-admin | 3.38 ▲0.04 | 45.35 ▼11.78 |
Posts /wp-admin/edit.php | 3.50 ▲0.14 | 47.07 ▲0.15 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.10 | 84.34 ▼16.05 |
Media Library /wp-admin/upload.php | 3.31 ▲0.08 | 33.90 ▲1.90 |
EM Purchase Code Validator /wp-admin/tools.php?page=em_settings_page | 3.29 | 32.32 |
Server storage [IO: ▲0.24MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
EM Purchase Code Validator: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,953 ▲167 | 13.86 ▼0.49 | 16.93 ▲15.06 | 41.36 ▲3.03 |
Dashboard /wp-admin | 2,203 ▲23 | 5.55 ▼0.06 | 83.08 ▼0.43 | 38.02 ▼4.64 |
Posts /wp-admin/edit.php | 2,105 ▲8 | 2.01 ▼0.01 | 34.00 ▼0.73 | 35.61 ▼4.30 |
Add New Post /wp-admin/post-new.php | 1,533 ▼3 | 22.96 ▲4.59 | 645.45 ▲11.84 | 58.92 ▼2.60 |
Media Library /wp-admin/upload.php | 1,411 ▲11 | 4.21 ▼0.02 | 101.75 ▲8.30 | 46.01 ▲4.33 |
EM Purchase Code Validator /wp-admin/tools.php?page=em_settings_page | 1,477 | 7.31 | 177.19 | 91.95 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- db_upgraded
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 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
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/em-purchase-code-validator/admin/partials/em-puchase-code-validator-admin-display.php:23
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/em-purchase-code-validator/public/partials/em-puchase-code-validator-public-display.php:59
- > 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/tools.php?page=em_settings_page
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
- > GET request to /wp-admin/tools.php?page=em_settings_page
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
- > GET request to /wp-admin/tools.php?page=em_settings_page
- > Deprecation (warning) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yQ/r/bnRvNSHX7Ev.js?_nc_x=Ij3Wp8lg5Kz 275 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.
- > GET request to /wp-admin/tools.php?page=em_settings_page
- > Console-api (severe) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yQ/r/bnRvNSHX7Ev.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
- Plugin Name: You should set the name of your plugin on the first line (
=== em-purchase-code-validator ===
)
em-purchase-code-validator/em-puchase-code-validator.php 85% from 13 tests
The main PHP file in "EM Purchase Code Validator" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: The principal plugin file should be the same as the plugin slug ("em-purchase-code-validator.php" instead of "em-puchase-code-validator.php")
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
No dangerous file extensions were detected1,209 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 1 | 0 | 0 | 371 |
CSS | 2 | 54 | 6 | 366 |
PHP | 12 | 142 | 502 | 320 |
JavaScript | 6 | 5 | 36 | 112 |
Markdown | 1 | 18 | 0 | 40 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.07 |
Average class complexity | 1.86 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 4.00 |
Average method complexity | 1.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 31 | |
▷ Static methods | 2 | 6.45% |
▷ Public methods | 26 | 83.87% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 16.13% |
Functions | 4 | |
▷ Named functions | 4 | 100.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
PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin