Benchmarks
Plugin footprint 65% 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.63MB] [CPU: ▼4.16ms] Passed 4 tests
Analyzing server-side resources used by New User Approve
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.14 ▲0.68 | 42.53 ▲1.52 |
Dashboard /wp-admin | 4.00 ▲0.65 | 53.85 ▼9.44 |
Posts /wp-admin/edit.php | 4.05 ▲0.70 | 50.76 ▲1.72 |
Add New Post /wp-admin/post-new.php | 6.54 ▲0.66 | 92.79 ▼9.06 |
Media Library /wp-admin/upload.php | 3.76 ▲0.53 | 39.71 ▲0.36 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 4.13 | 40.25 |
Server storage [IO: ▲4.74MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 270 new files
Database: no new tables, 9 new options
New WordPress options |
---|
fs_accounts |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
fs_debug_mode |
widget_recent-posts |
fs_active_plugins |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by New User Approve
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,863 ▲92 | 13.29 ▼1.08 | 1.64 ▼0.32 | 34.59 ▼9.07 |
Dashboard /wp-admin | 2,266 ▲75 | 4.92 ▲0.04 | 102.20 ▼1.74 | 43.66 ▲0.13 |
Posts /wp-admin/edit.php | 2,133 ▲44 | 2.05 ▲0.05 | 39.02 ▼7.44 | 39.41 ▼1.30 |
Add New Post /wp-admin/post-new.php | 1,543 ▲2 | 23.24 ▲4.78 | 677.79 ▲36.18 | 53.13 ▼1.00 |
Media Library /wp-admin/upload.php | 1,436 ▲48 | 4.23 ▲0.01 | 99.78 ▲0.09 | 45.85 ▲1.12 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,083 | 1.73 | 28.42 | 34.88 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/new-user-approve/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- This plugin does not fully uninstall, leaving 9 options in the database
- fs_debug_mode
- fs_active_plugins
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
- fs_accounts
- widget_theysaidso_widget
- 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)
The smoke test was a success, however most plugin functionality was not tested
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
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/new-user-approve/admin/templates/upgrade.php
- 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Warning
require(../../../includes/bootstrap.php): failed to open stream: No such file or directory in wp-content/plugins/new-user-approve/tests/bootstrap.php on line 21
- > PHP Fatal error
Uncaught Error: Call to undefined function NewUserApproveZapier\\add_action() in wp-content/plugins/new-user-approve/includes/zapier/includes/rest-api.php:29
- > PHP Fatal error
require(): Failed opening required '../../../includes/bootstrap.php' (include_path='.:/usr/share/php') in wp-content/plugins/new-user-approve/tests/bootstrap.php on line 21
- > PHP Fatal error
Uncaught Error: Call to undefined function NewUserApproveZapier\\plugin_dir_path() in wp-content/plugins/new-user-approve/includes/zapier/zapier.php:36
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/new-user-approve/includes/invitation-code.php:48
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/new-user-approve/tests/test-users.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function NewUserApproveZapier\\add_action() in wp-content/plugins/new-user-approve/includes/zapier/includes/user.php:27
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/new-user-approve/includes/plugins.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/new-user-approve/includes/admin-approve.php:41
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/new-user-approve/includes/user-list.php:26
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: user management, user registration, user approval, registration, users
new-user-approve/new-user-approve.php 92% from 13 tests
"New User Approve" version 2.5.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
- Description: Please keep the plugin description shorter than 140 characters (currently 243 characters long)
Code Analysis 97% from 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
There were no executable files found in this plugin58,003 lines of code in 197 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 134 | 8,640 | 18,057 | 36,844 |
PO File | 37 | 8,689 | 10,584 | 20,123 |
JavaScript | 7 | 62 | 97 | 473 |
CSS | 14 | 63 | 3 | 253 |
Markdown | 1 | 68 | 0 | 214 |
Bourne Shell | 1 | 10 | 6 | 42 |
JSON | 1 | 0 | 0 | 27 |
XML | 1 | 0 | 0 | 14 |
YAML | 1 | 4 | 0 | 13 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.61 |
Average class complexity | 83.61 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.47 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 57 | |
▷ Abstract classes | 2 | 3.51% |
▷ Concrete classes | 55 | 96.49% |
▷ Final classes | 0 | 0.00% |
Methods | 1,387 | |
▷ Static methods | 205 | 14.78% |
▷ Public methods | 992 | 71.52% |
▷ Protected methods | 17 | 1.23% |
▷ Private methods | 378 | 27.25% |
Functions | 129 | |
▷ Named functions | 128 | 99.22% |
▷ Anonymous functions | 1 | 0.78% |
Constants | 146 | |
▷ Global constants | 99 | 67.81% |
▷ Class constants | 47 | 32.19% |
▷ Public constants | 47 | 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
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/templates/image/new-user-logo.png | 2.68KB | 2.78KB | 0.00% |
freemius/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
freemius/assets/img/new-user-approve.png | 9.16KB | 5.26KB | ▼ 42.58% |
freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |