Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲5.56MB] [CPU: ▲27.42ms] 75% from 4 tests
A check of server-side resources used by Expandable Paywall
Please have a look at the following items
- Extra RAM: The extra memory usage should kept under 5MB (currently 5.56MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.33 ▲5.86 | 64.42 ▲22.49 |
Dashboard /wp-admin | 9.35 ▲6.04 | 78.87 ▲30.28 |
Posts /wp-admin/edit.php | 9.35 ▲5.99 | 84.51 ▲38.62 |
Add New Post /wp-admin/post-new.php | 10.25 ▲4.36 | 118.65 ▲23.04 |
Media Library /wp-admin/upload.php | 9.35 ▲6.11 | 68.03 ▲33.85 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 9.35 | 62.21 |
Server storage [IO: ▲8.05MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 908 new files
Database: 1 new table, 10 new options
New tables |
---|
wp_expandable_paywall_log |
New WordPress options |
---|
fs_debug_mode |
widget_recent-comments |
db_upgraded |
expandable-paywall_logging_database_present |
fs_accounts |
theysaidso_admin_options |
widget_theysaidso_widget |
fs_active_plugins |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
Checking browser requirements for Expandable Paywall
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,828 ▲66 | 14.31 ▼0.40 | 1.48 ▼0.21 | 28.42 ▼16.93 |
Dashboard /wp-admin | 2,233 ▲65 | 5.52 ▼0.16 | 98.19 ▼2.89 | 46.65 ▲1.47 |
Posts /wp-admin/edit.php | 2,142 ▲42 | 2.02 ▲0.01 | 40.63 ▲3.80 | 40.34 ▲1.52 |
Add New Post /wp-admin/post-new.php | 1,573 ▲47 | 22.40 ▼0.67 | 683.23 ▲2.34 | 55.26 ▲0.55 |
Media Library /wp-admin/upload.php | 1,438 ▲35 | 4.26 ▲0.08 | 100.03 ▼2.60 | 48.74 ▲6.25 |
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius | 1,093 | 1.66 | 28.17 | 29.73 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/expandable-paywall/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8546
Undefined property: stdClass::$plugins
- The uninstall procedure failed, leaving 1 table in the database
- wp_expandable_paywall_log
- Zombie WordPress options were found after uninstall: 10 options
- widget_recent-comments
- widget_theysaidso_widget
- fs_debug_mode
- expandable-paywall_logging_database_present
- theysaidso_admin_options
- fs_accounts
- db_upgraded
- widget_recent-posts
- fs_active_plugins
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested
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 fix the following items
- 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Grav\\Common\\Plugin' not found in wp-content/plugins/expandable-paywall/vendor/select2/select2/docs/plugins/simplesearch/simplesearch.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/expandable-paywall/admin/partials/settings-authentication-roles.php:2
- > PHP Fatal error
Uncaught Error: Class 'Grav\\Common\\Plugin' not found in wp-content/plugins/expandable-paywall/vendor/select2/select2/docs/plugins/highlight/highlight.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function do_action() in wp-content/plugins/expandable-paywall/public/templates/register.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/expandable-paywall/admin/partials/settings.php:2
- > PHP Fatal error
Uncaught Error: Class 'Grav\\Common\\Plugin' not found in wp-content/plugins/expandable-paywall/vendor/select2/select2/docs/plugins/breadcrumbs/breadcrumbs.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/expandable-paywall/admin/partials/settings-sidebar.php:4
- > PHP Fatal error
Uncaught Error: Class 'Grav\\Console\\ConsoleCommand' not found in wp-content/plugins/expandable-paywall/vendor/select2/select2/docs/plugins/error/cli/LogCommand.php:13
- > PHP Fatal error
Uncaught Error: Class 'Grav\\Common\\Plugin' not found in wp-content/plugins/expandable-paywall/vendor/select2/select2/docs/plugins/error/error.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/expandable-paywall/admin/partials/log.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: paywall, hard paywall, pcs link, cambey west, ip based authentication...
expandable-paywall/expandable-paywall.php Passed 13 tests
The primary PHP file in "Expandable Paywall" version 2.0.20 is used by WordPress to initiate all plugin functionality
97 characters long description:
A simple paywall solution with integration with several third party providers for authentication.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin103,596 lines of code in 758 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 237 | 12,152 | 6,615 | 45,435 |
PHP | 156 | 8,878 | 18,365 | 36,254 |
CSS | 100 | 1,378 | 621 | 8,126 |
Sass | 132 | 1,011 | 534 | 4,639 |
Markdown | 62 | 1,610 | 0 | 4,485 |
SVG | 4 | 0 | 1 | 2,697 |
YAML | 28 | 55 | 0 | 807 |
Twig | 24 | 56 | 0 | 557 |
HTML | 7 | 65 | 0 | 344 |
JSON | 7 | 0 | 0 | 250 |
Bourne Shell | 1 | 0 | 0 | 2 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
- Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.60 |
Average class complexity | 65.69 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,096.00 |
Average method complexity | 4.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 6 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 74 | |
▷ Abstract classes | 2 | 2.70% |
▷ Concrete classes | 72 | 97.30% |
▷ Final classes | 0 | 0.00% |
Methods | 1,451 | |
▷ Static methods | 258 | 17.78% |
▷ Public methods | 1,025 | 70.64% |
▷ Protected methods | 26 | 1.79% |
▷ Private methods | 400 | 27.57% |
Functions | 111 | |
▷ Named functions | 105 | 94.59% |
▷ Anonymous functions | 6 | 5.41% |
Constants | 153 | |
▷ Global constants | 103 | 67.32% |
▷ Class constants | 50 | 32.68% |
▷ Public constants | 50 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
78 PNG files occupy 1.04MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/select2/select2/docs/themes/site/images/favicon.png | 1.13KB | 1.03KB | ▼ 9.09% |
vendor/select2/select2/docs/pages/images/flags/ri.png | 6.76KB | 3.13KB | ▼ 53.76% |
vendor/select2/select2/docs/pages/images/flags/wv.png | 44.19KB | 5.77KB | ▼ 86.94% |
vendor/select2/select2/docs/themes/site/images/apple-touch-icon.png | 1.59KB | 1.49KB | ▼ 6.21% |
vendor/select2/select2/docs/pages/images/flags/mi.png | 10.23KB | 4.30KB | ▼ 57.95% |