Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼275.95ms] Passed 4 tests
Analyzing server-side resources used by Safe Staging
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 28.36 ▲9.13 |
Dashboard /wp-admin | 3.07 ▲0.02 | 40.84 ▼4.97 |
Posts /wp-admin/edit.php | 3.12 ▲0.02 | 44.68 ▲2.51 |
Add New Post /wp-admin/post-new.php | 5.43 ▲0.00 | 87.76 ▼1,088.09 |
Media Library /wp-admin/upload.php | 3.01 ▲0.01 | 30.32 ▼13.25 |
Safe Staging /wp-admin/options-general.php?page=safe-staging | 3.01 | 27.30 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Safe Staging
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,735 ▲129 | 16.05 ▲0.49 | 11.56 ▲2.27 | 49.99 ▲1.00 |
Dashboard /wp-admin | 2,976 ▲126 | 6.21 ▲0.22 | 134.28 ▲4.61 | 100.02 ▲3.42 |
Posts /wp-admin/edit.php | 2,754 ▲51 | 2.70 ▲0.00 | 64.05 ▲2.14 | 94.54 ▲2.51 |
Add New Post /wp-admin/post-new.php | 1,671 ▼2,036 | 18.85 ▲3.73 | 346.35 ▼97.87 | 102.26 ▼7.46 |
Media Library /wp-admin/upload.php | 1,730 ▼45 | 5.05 ▲0.03 | 148.53 ▲0.71 | 107.13 ▼9.89 |
Safe Staging /wp-admin/options-general.php?page=safe-staging | 1,019 | 2.09 | 54.37 | 73.50 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
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
Please take a closer look at the following
- 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function SafeStaging\\esc_html_e() in wp-content/plugins/safe-staging/templates/notice-production.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function SafeStaging\\esc_html_e() in wp-content/plugins/safe-staging/templates/staging-notice.php:13
- > PHP Warning
Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/safe-staging/inc/class-fake-phpmailer.php on line 18
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHWPINC/class-phpmailer.php' (include_path='.:/usr/share/php') in wp-content/plugins/safe-staging/inc/class-fake-phpmailer.php on line 18
- > PHP Fatal error
Uncaught Error: Call to undefined function SafeStaging\\esc_html_e() in wp-content/plugins/safe-staging/templates/notice-setup.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function SafeStaging\\esc_html_e() in wp-content/plugins/safe-staging/templates/setup-notice.php:13
- > PHP Warning
require_once(ABSPATHWPINC/class-phpmailer.php): failed to open stream: No such file or directory in wp-content/plugins/safe-staging/inc/class-fake-phpmailer.php on line 18
- > PHP Fatal error
Uncaught Error: Call to undefined function SafeStaging\\plugin_dir_path() in wp-content/plugins/safe-staging/safe-staging.php:41
- > PHP Fatal error
Uncaught Error: Call to undefined function SafeStaging\\esc_html_e() in wp-content/plugins/safe-staging/templates/admin-page.php:12
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/safe-staging/inc/class-fake-phpmailer.php on line 18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: email, woocommerce, staging
safe-staging/safe-staging.php Passed 13 tests
The main PHP file in "Safe Staging" ver. 0.3.2 adds more information about the plugin and also serves as the entry point for this plugin
42 characters long description:
Disables user activities on a staging site
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
There were no executable files found in this plugin706 lines of code in 21 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 18 | 147 | 362 | 588 |
Markdown | 1 | 40 | 0 | 101 |
JSON | 2 | 0 | 0 | 17 |
PHP code Passed 2 tests
This is a very shot 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.39 |
Average class complexity | 10.86 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 2.77 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 40 | |
▷ Static methods | 7 | 17.50% |
▷ Public methods | 37 | 92.50% |
▷ Protected methods | 2 | 5.00% |
▷ Private methods | 1 | 2.50% |
Functions | 5 | |
▷ Named functions | 3 | 60.00% |
▷ Anonymous functions | 2 | 40.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected