Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▼0.60MB] [CPU: ▼14.15ms] Passed 4 tests
Analyzing server-side resources used by Shariff for Wordpress
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 38.81 ▼1.52 |
Dashboard /wp-admin | 3.41 ▲0.10 | 51.69 ▼0.80 |
Posts /wp-admin/edit.php | 3.52 ▲0.16 | 51.09 ▼4.73 |
Add New Post /wp-admin/post-new.php | 3.25 ▼2.63 | 48.15 ▼46.28 |
Media Library /wp-admin/upload.php | 3.33 ▲0.10 | 34.10 ▼4.05 |
Shariff /wp-admin/options-general.php?page=shariff | 3.30 | 37.22 |
Server storage [IO: ▲4.17MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 622 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Shariff for Wordpress
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,960 ▲199 | 13.79 ▼0.96 | 10.50 ▲8.77 | 36.66 ▼6.13 |
Dashboard /wp-admin | 2,225 ▲25 | 4.85 ▼1.04 | 100.34 ▼12.02 | 39.09 ▼7.19 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.05 ▲0.08 | 35.35 ▼5.59 | 38.65 ▼3.12 |
Add New Post /wp-admin/post-new.php | 6,222 ▲4,691 | 19.15 ▼4.08 | 935.69 ▲324.28 | 70.93 ▲12.35 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.35 ▲0.06 | 101.72 ▼9.50 | 44.74 ▲0.63 |
Shariff /wp-admin/options-general.php?page=shariff | 1,006 | 2.15 | 24.50 | 39.90 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- widget_recent-comments
Smoke tests 50% 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)
Good news, no errors were detected
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
The following issues need your attention
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/shariff-sharing/shariff-wp.php
- 378× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Zend\\ServiceManager\\Exception\\RuntimeException' not found in wp-content/plugins/shariff-sharing/backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/ServiceNotCreatedException.php:12
- > PHP Fatal error
Uncaught Error: Class 'Zend\\ServiceManager\\Exception\\RuntimeException' not found in wp-content/plugins/shariff-sharing/backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/Exception/InvalidServiceNameException.php:12
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/shariff-sharing/backend/vendor/guzzlehttp/guzzle/src/Client.php:22
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shariff-sharing/backend/vendor/guzzlehttp/guzzle/tests/MimetypesTest.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Zend\\Json\\Exception\\ExceptionInterface' not found in wp-content/plugins/shariff-sharing/backend/vendor/zendframework/zend-json/Zend/Json/Exception/BadMethodCallException.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Zend\\Cache\\Storage\\IteratorInterface' not found in wp-content/plugins/shariff-sharing/backend/vendor/zendframework/zend-cache/Zend/Cache/Storage/Adapter/DbaIterator.php:15
- > PHP Fatal error
Uncaught Error: Interface 'Zend\\ServiceManager\\ServiceLocatorInterface' not found in wp-content/plugins/shariff-sharing/backend/vendor/zendframework/zend-servicemanager/Zend/ServiceManager/ServiceManager.php:14
- > PHP Fatal error
Uncaught Error: Interface 'React\\Promise\\ExtendedPromiseInterface' not found in wp-content/plugins/shariff-sharing/backend/vendor/react/promise/src/FulfilledPromise.php:5
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shariff-sharing/backend/vendor/guzzlehttp/streams/tests/LimitStreamTest.php:12
- > PHP Fatal error
Uncaught Error: Interface 'Zend\\Config\\Processor\\ProcessorInterface' not found in wp-content/plugins/shariff-sharing/backend/vendor/zendframework/zend-config/Zend/Config/Processor/Filter.php:16
- > 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 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
Please fix the following attributes:
- Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
shariff-sharing/shariff-wp.php 85% from 13 tests
"Shariff for Wordpress" version 1.0.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shariff-sharing.php" instead of "shariff-wp.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected50,806 lines of code in 589 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 520 | 8,200 | 20,549 | 41,246 |
Markdown | 13 | 644 | 0 | 2,519 |
CSS | 2 | 0 | 15 | 2,114 |
reStructuredText | 19 | 1,221 | 1,574 | 2,019 |
SVG | 2 | 0 | 0 | 1,085 |
JSON | 11 | 0 | 0 | 858 |
make | 5 | 78 | 10 | 333 |
JavaScript | 3 | 24 | 72 | 228 |
PO File | 3 | 81 | 85 | 216 |
YAML | 4 | 17 | 0 | 73 |
XML | 4 | 2 | 0 | 71 |
Python | 2 | 10 | 0 | 41 |
HTML | 1 | 0 | 0 | 3 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
Average class complexity | 7.90 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 181.00 |
Average method complexity | 2.15 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 43.00 |
Code structure | ||
---|---|---|
Namespaces | 71 | |
Interfaces | 89 | |
Traits | 25 | |
Classes | 410 | |
▷ Abstract classes | 22 | 5.37% |
▷ Concrete classes | 388 | 94.63% |
▷ Final classes | 3 | 0.77% |
Methods | 3,505 | |
▷ Static methods | 190 | 5.42% |
▷ Public methods | 3,050 | 87.02% |
▷ Protected methods | 340 | 9.70% |
▷ Private methods | 115 | 3.28% |
Functions | 434 | |
▷ Named functions | 47 | 10.83% |
▷ Anonymous functions | 387 | 89.17% |
Constants | 68 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 68 | 100.00% |
▷ Public constants | 68 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.37MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
backend/vendor/guzzlehttp/guzzle/docs/_static/logo.png | 241.87KB | 69.68KB | ▼ 71.19% |
backend/vendor/guzzlehttp/guzzle/docs/_static/guzzle-icon.png | 0.78KB | 0.94KB | 0.00% |
assets/screenshot-2.png | 43.29KB | 12.83KB | ▼ 70.36% |
assets/screenshot-3.png | 43.79KB | 13.03KB | ▼ 70.24% |
assets/screenshot-1.png | 44.33KB | 12.94KB | ▼ 70.82% |