Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▼0.17MB] [CPU: ▼20.83ms] Passed 4 tests
Server-side resources used by Pinterest Pin It Button For Images
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.42 ▼0.04 | 26.10 ▼15.42 |
Dashboard /wp-admin | 3.15 ▼0.15 | 34.57 ▼16.41 |
Posts /wp-admin/edit.php | 3.29 ▼0.07 | 35.21 ▼18.70 |
Add New Post /wp-admin/post-new.php | 5.48 ▼0.41 | 71.33 ▼32.80 |
Media Library /wp-admin/upload.php | 3.22 ▼0.01 | 29.92 ▼12.64 |
Pin it! /wp-admin/options-general.php?page=pib-settings | 3.13 | 26.07 |
Server storage [IO: ▲0.19MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
widget_recent-comments |
widget_theysaidso_widget |
pib_button_options |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Pinterest Pin It Button For Images
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,824 ▲74 | 14.25 ▼0.30 | 1.84 ▲0.22 | 42.14 ▼0.42 |
Dashboard /wp-admin | 2,205 ▲28 | 5.63 ▲0.10 | 89.86 ▼7.33 | 39.45 ▼11.57 |
Posts /wp-admin/edit.php | 2,107 ▲7 | 2.00 ▲0.05 | 39.76 ▼1.85 | 36.96 ▼1.79 |
Add New Post /wp-admin/post-new.php | 1,534 ▲6 | 23.03 ▼0.21 | 639.35 ▼55.06 | 57.78 ▲1.08 |
Media Library /wp-admin/upload.php | 1,407 ▲7 | 4.19 ▲0.01 | 95.71 ▼13.98 | 45.47 ▼1.07 |
Pin it! /wp-admin/options-general.php?page=pib-settings | 936 | 1.94 | 38.18 | 43.42 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- The uninstall procedure has failed, leaving 7 options in the database
- can_compress_scripts
- pib_button_options
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
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
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=pib-settings
- > User deprecated in wp-includes/functions.php+5453
Function get_current_theme is deprecated since version 3.4.0! Use wp_get_theme() instead.
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
Almost there! Just fix the following items
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/pin-it-button/pib-admin.php:13
- > PHP Warning
Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/pin-it-button/pib-admin.php on line 13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% 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 need to be fixed:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (If your image has padding, borders, or any additional placement styles. The Pin It! Default styles will need to be overwritten.), #2 (Pin It! Settings page showing the media upload box.)
pin-it-button/pib-admin.php 92% from 13 tests
The main file in "Pinterest Pin It Button For Images" v. 0.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pin-it-button.php" instead of "pib-admin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected337 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 52 | 36 | 239 |
CSS | 1 | 1 | 1 | 84 |
JavaScript | 1 | 7 | 12 | 14 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/pib-pinterest.png | 2.87KB | 1.59KB | ▼ 44.50% |
images/pinterestlogo.png | 13.21KB | 5.23KB | ▼ 60.37% |
screenshot-1.png | 84.18KB | 32.43KB | ▼ 61.48% |
screenshot-2.png | 75.40KB | 27.86KB | ▼ 63.06% |