Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲1.82MB] [CPU: ▲11.09ms] Passed 4 tests
A check of server-side resources used by Pay2Post
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.31 ▲1.84 | 63.40 ▲22.11 |
Dashboard /wp-admin | 5.23 ▲1.92 | 57.45 ▲5.22 |
Posts /wp-admin/edit.php | 5.29 ▲1.93 | 62.98 ▲13.67 |
Add New Post /wp-admin/post-new.php | 7.48 ▲1.59 | 104.85 ▲3.37 |
Media Library /wp-admin/upload.php | 5.24 ▲2.00 | 60.50 ▲23.57 |
Orders /wp-admin/edit.php?post_type=transaction | 5.27 | 64.28 |
Settings /wp-admin/admin.php?page=app-payments-settings | 5.23 | 67.75 |
Server storage [IO: ▲1.12MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 221 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_p2pmeta |
wp_p2p |
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_p2p |
widget_recent-posts |
Browser metrics Passed 4 tests
Pay2Post: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,828 ▲42 | 14.24 ▼0.12 | 1.67 ▼0.01 | 39.53 ▼8.73 |
Dashboard /wp-admin | 2,226 ▲49 | 5.54 ▼0.14 | 82.95 ▼8.60 | 74.21 ▲32.66 |
Posts /wp-admin/edit.php | 2,137 ▲34 | 1.99 ▼0.02 | 33.93 ▼3.56 | 35.63 ▲2.05 |
Add New Post /wp-admin/post-new.php | 1,557 ▲31 | 23.58 ▲0.65 | 679.77 ▼16.48 | 117.13 ▲65.21 |
Media Library /wp-admin/upload.php | 1,431 ▲31 | 4.08 ▼0.08 | 105.66 ▼12.89 | 65.61 ▲16.45 |
Orders /wp-admin/edit.php?post_type=transaction | 1,190 | 1.94 | 30.83 | 32.75 |
Settings /wp-admin/admin.php?page=app-payments-settings | 1,075 | 1.70 | 24.67 | 38.62 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- The plugin did not uninstall successfully, leaving 2 tables in the database
- wp_p2pmeta
- wp_p2p
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_p2p
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=app-payments-settings
- > User deprecated in wp-includes/functions.php+5828
Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
- > GET request to /wp-admin/edit.php?post_type=transaction
- > POST request to /wp-admin/admin-ajax.php
- > Notice in wp-content/plugins/pay2post/admin/settings.php+6
Trying to access array offset on value of type null
- > GET request to /wp-admin/admin.php?page=app-payments-settings
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/admin.php?page=app-payments-settings
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
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
Please take a closer look at the following
- 119× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
require_once(): Failed opening required 'APP_TESTS_LIB/testcase.php' (include_path='.:/usr/share/php') in wp-content/plugins/pay2post/lib/payments/tests/test_templates.php on line 8
- > PHP Fatal error
Uncaught Error: Class 'scbAdminPage' not found in wp-content/plugins/pay2post/lib/framework/admin/class-tabs-page.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pay2post/lib/framework/includes/wrapping.php:54
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_get_theme() in wp-content/plugins/pay2post/pay-to-post.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/pay2post/lib/payments/gateways/bank-transfer/bank-transfer.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function is_rtl() in wp-content/plugins/pay2post/lib/framework/templates/email-template.php:6
- > PHP Warning
require_once(APP_TESTS_LIB/testcase.php): failed to open stream: No such file or directory in wp-content/plugins/pay2post/lib/payments/tests/test_queue.php on line 8
- > PHP Fatal error
Uncaught Error: Class 'P2P_Item' not found in wp-content/plugins/pay2post/lib/framework/p2p-core/item-post.php:3
- > PHP Fatal error
'continue' not in the 'loop' or 'switch' context in wp-content/plugins/pay2post/lib/framework/admin/importer.php on line 380
- > PHP Warning
require_once(APP_TESTS_LIB/testcase.php): failed to open stream: No such file or directory in wp-content/plugins/pay2post/lib/payments/tests/test_templates.php on line 8
- > 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 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Pay2Post is loaded with AppThemes Payments which allows you to accept a wide range of payment methods through plugins.), #2 (Insert a post form in any page or posts to allow users to submit content.), #3 (Easily set the price to post content from the backend settings.)
pay2post/pay-to-post.php 92% from 13 tests
The main PHP file in "Pay2Post" ver. 0.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: The principal plugin file should be the same as the plugin slug ("pay2post.php" instead of "pay-to-post.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected20,147 lines of code in 171 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 146 | 5,492 | 4,717 | 14,947 |
JavaScript | 20 | 692 | 531 | 3,796 |
CSS | 4 | 113 | 79 | 1,382 |
JSON | 1 | 0 | 0 | 22 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 11.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 131.00 |
Average method complexity | 2.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 36.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 140 | |
▷ Abstract classes | 14 | 10.00% |
▷ Concrete classes | 126 | 90.00% |
▷ Final classes | 0 | 0.00% |
Methods | 1,074 | |
▷ Static methods | 241 | 22.44% |
▷ Public methods | 922 | 85.85% |
▷ Protected methods | 93 | 8.66% |
▷ Private methods | 59 | 5.49% |
Functions | 342 | |
▷ Named functions | 342 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 61 | |
▷ Global constants | 19 | 31.15% |
▷ Class constants | 42 | 68.85% |
▷ Public constants | 42 | 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
45 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
lib/framework/images/chart-bar.png | 0.53KB | 0.74KB | 0.00% |
lib/framework/styles/jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png | 0.18KB | 0.08KB | ▼ 51.67% |
lib/framework/images/cancel.png | 0.83KB | 0.80KB | ▼ 3.40% |
lib/framework/styles/jquery-ui/images/ui-bg_glass_75_dadada_1x400.png | 0.11KB | 0.16KB | 0.00% |
images/del.png | 0.64KB | 0.72KB | 0.00% |