Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/twitwi/widgets/connect.php+5
Methods with the same name as their class will not be constructors in a future version of PHP; WP_Twitwi_Connect has a deprecated constructor
Server metrics [RAM: ▼1.79MB] [CPU: ▼192.82ms] Passed 4 tests
A check of server-side resources used by Twitwi
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.84 ▼0.88 | 6.53 ▼14.42 |
Dashboard /wp-admin | 1.86 ▼1.20 | 6.66 ▼40.00 |
Posts /wp-admin/edit.php | 1.86 ▼1.25 | 6.54 ▼41.11 |
Add New Post /wp-admin/post-new.php | 1.86 ▼3.58 | 6.30 ▼664.14 |
Media Library /wp-admin/upload.php | 1.86 ▼1.15 | 6.21 ▼26.01 |
Twitwi /wp-admin/options-general.php?page=twitwi-page-options | 1.86 | 6.51 |
Server storage [IO: ▲0.91MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 45 new files
Database: no new tables, 8 new options
New WordPress options |
---|
twitwi_role_default |
twitwi_logout_redirect |
twitwi_domain_mail_default |
twitwi_register_notif |
widget_wp_twitwi_connect |
twitwi_logged_redirect |
twitwi_include_entities |
twitwi_db_version |
Browser metrics Passed 4 tests
An overview of browser requirements for Twitwi
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,824 ▲228 | 16.27 ▲0.24 | 17.73 ▲7.55 | 52.79 ▲4.42 |
Dashboard /wp-admin | 2,979 ▲42 | 5.95 ▲0.00 | 155.02 ▲7.08 | 112.55 ▲1.65 |
Posts /wp-admin/edit.php | 2,748 ▲9 | 2.71 ▲0.00 | 76.42 ▲5.92 | 92.31 ▲4.02 |
Add New Post /wp-admin/post-new.php | 1,622 ▼61 | 21.39 ▲2.60 | 303.86 ▼88.30 | 107.89 ▼1.96 |
Media Library /wp-admin/upload.php | 1,819 ▲9 | 5.06 ▲0.03 | 163.19 ▲6.99 | 112.82 ▼2.52 |
Twitwi /wp-admin/options-general.php?page=twitwi-page-options | 1,286 | 2.37 | 58.83 | 91.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/twitwi/widgets/connect.php+5
Methods with the same name as their class will not be constructors in a future version of PHP; WP_Twitwi_Connect has a deprecated constructor
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
- > GET request to /wp-admin/options-general.php?page=twitwi-page-options
- > Deprecated in wp-content/plugins/twitwi/widgets/connect.php+5
Methods with the same name as their class will not be constructors in a future version of PHP; WP_Twitwi_Connect has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=twitwi-page-options
- > Deprecated in wp-content/plugins/twitwi/twitwi.php+40
Function create_function() is deprecated
- > GET request to /wp-admin/options-general.php?page=twitwi-page-options
- > User deprecated in wp-includes/functions.php+5304
The called constructor method for WP_Widget in WP_Twitwi_Connect is deprecated since version 4.3.0! Use __construct() instead.
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
The following issues need your attention
- 20× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitwi/inc/twitteroauth/tests/Util/JsonDecoderTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitwi/inc/twitteroauth/tests/ConsumerTest.php:7
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/twitwi/template/connected.php on line 12
- > PHP Fatal error
require_once(): Failed opening required 'WP_PLUGIN_DIR/twitwi/inc/twitteroauth/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/twitwi/template/connected.php on line 12
- > PHP Warning
require_once(wp-content/plugins/twitwi/twitwi/library/includes/compat.php): failed to open stream: No such file or directory in wp-content/plugins/twitwi/twitwi.php on line 31
- > PHP Warning
Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/twitwi/template/connect.php on line 11
- > PHP Warning
require(wp-content/plugins/twitwi/inc/twitteroauth/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/twitwi/inc/twitteroauth/tests/bootstrap.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitwi/inc/twitteroauth/tests/AbstractSignatureMethodTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/twitwi/inc/twitteroauth/tests/TokenTest.php:7
- > PHP Warning
require_once(WP_PLUGIN_DIR/twitwi/inc/twitteroauth/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/twitwi/template/connected.php on line 12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: twitter, connect, avatar, user, api...
twitwi/twitwi.php Passed 13 tests
The main PHP file in "Twitwi" ver. 1.11 adds more information about the plugin and also serves as the entry point for this plugin
45 characters long description:
Twitwi, Another Twitter Connect for WordPress
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,758 lines of code in 38 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 27 | 294 | 748 | 1,526 |
PO File | 1 | 31 | 32 | 85 |
JavaScript | 2 | 8 | 17 | 36 |
JSON | 1 | 0 | 0 | 34 |
Markdown | 2 | 7 | 0 | 25 |
XML | 2 | 2 | 1 | 23 |
CSS | 2 | 4 | 12 | 19 |
YAML | 1 | 0 | 0 | 10 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 4.22 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 22.00 |
Average method complexity | 1.56 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 4 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 18 | |
▷ Abstract classes | 2 | 11.11% |
▷ Concrete classes | 16 | 88.89% |
▷ Final classes | 0 | 0.00% |
Methods | 108 | |
▷ Static methods | 7 | 6.48% |
▷ Public methods | 95 | 87.96% |
▷ Protected methods | 5 | 4.63% |
▷ Private methods | 8 | 7.41% |
Functions | 27 | |
▷ Named functions | 25 | 92.59% |
▷ Anonymous functions | 2 | 7.41% |
Constants | 14 | |
▷ Global constants | 10 | 71.43% |
▷ Class constants | 4 | 28.57% |
▷ Public constants | 4 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected