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 gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▼5.11ms] Passed 4 tests
An overview of server-side resources used by xkcd-shortcode
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 39.59 ▲2.07 |
Dashboard /wp-admin | 3.32 ▲0.02 | 45.76 ▼2.96 |
Posts /wp-admin/edit.php | 3.44 ▲0.08 | 41.24 ▼7.01 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 78.96 ▼10.97 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 33.25 ▲0.49 |
Server storage [IO: ▲0.15MB] [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: 18 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for xkcd-shortcode
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 14.74 ▲0.43 | 1.87 ▲0.20 | 43.31 ▲2.98 |
Dashboard /wp-admin | 2,206 ▲18 | 4.87 ▼0.16 | 111.39 ▲9.63 | 41.60 ▼1.75 |
Posts /wp-admin/edit.php | 2,071 ▼21 | 2.03 ▲0.03 | 34.84 ▼11.40 | 40.91 ▼10.76 |
Add New Post /wp-admin/post-new.php | 1,514 ▼0 | 17.56 ▼0.24 | 661.99 ▼9.26 | 50.55 ▼0.16 |
Media Library /wp-admin/upload.php | 1,382 ▼3 | 4.20 ▼0.11 | 96.04 ▼8.58 | 44.60 ▼0.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
The following issues need your attention
- 7× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/xkcd-shortcode/tests/XKCDLoaderTest.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/xkcd-shortcode/lib/XKCDShortcodePlugin.php:9
- > PHP Fatal error
require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/xkcd-shortcode/tests/bootstrap.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/xkcd-shortcode/tests/XKCDShortcodeTest.php:5
- > PHP Warning
require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/xkcd-shortcode/tests/bootstrap.php on line 6
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/xkcd-shortcode/tests/XKCDShortcodePluginTest.php:6
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/xkcd-shortcode/tests/CachedXKCDLoaderTest.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
- Screenshots: Add an image for screenshot #1 (The XKCD Webcomic #1 embedded in a Post.)
xkcd-shortcode/xkcd-shortcode.php Passed 13 tests
The entry point to "xkcd-shortcode" version 0.8.0 is a PHP file that has certain tags in its header comment area
64 characters long description:
Adds an [xkcd] shortcode that loads the XKCD webcomic by number.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin460 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 118 | 11 | 372 |
Bourne Shell | 1 | 15 | 4 | 59 |
JSON | 2 | 0 | 0 | 15 |
XML | 1 | 0 | 0 | 14 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.07 |
Average class complexity | 2.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 1.19 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 59 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 59 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.11MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 112.58KB | 56.80KB | ▼ 49.54% |