Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▼3.20ms] Passed 4 tests
Server-side resources used by Offline Shell
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.02 | 44.87 ▼2.92 |
Dashboard /wp-admin | 3.33 ▲0.02 | 52.35 ▼3.24 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 50.87 ▼0.36 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 88.13 ▼6.27 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 38.53 ▲0.15 |
Offline Shell /wp-admin/options-general.php?page=offline-shell-options | 3.22 | 33.12 |
Server storage [IO: ▲0.10MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 11 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
offline_shell_race_enabled |
offline_shell_files |
offline_shell_version |
offline_shell_enabled |
offline_shell_debug |
widget_theysaidso_widget |
widget_recent-comments |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Offline Shell
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,795 ▲34 | 14.25 ▼0.42 | 2.08 ▲0.27 | 43.14 ▼1.84 |
Dashboard /wp-admin | 2,193 ▲22 | 5.54 ▼0.04 | 91.16 ▼10.76 | 39.87 ▼8.24 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 2.16 ▲0.13 | 39.26 ▲0.76 | 35.52 ▼1.61 |
Add New Post /wp-admin/post-new.php | 1,529 ▲1 | 23.63 ▲0.56 | 700.78 ▲85.72 | 56.38 ▼19.27 |
Media Library /wp-admin/upload.php | 1,398 ▼2 | 4.24 ▲0.10 | 97.57 ▼5.92 | 43.98 ▼2.28 |
Offline Shell /wp-admin/options-general.php?page=offline-shell-options | 4,082 | 1.70 | 36.61 | 75.47 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 75% 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)
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 3× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/offline-shell/wp-offline-shell-main.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/offline-shell/wp-offline-shell.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/offline-shell/wp-offline-shell-admin.php:3
- > 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)
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
- Plugin Name: You should set the name of your plugin on the first line (
=== offline-shell ===
)
offline-shell/wp-offline-shell.php 92% from 13 tests
Analyzing the main PHP file in "Offline Shell" version 0.4.0
The following require your attention:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("offline-shell.php" instead of "wp-offline-shell.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 detected1,189 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 198 | 284 | 880 |
JavaScript | 3 | 22 | 35 | 146 |
Markdown | 1 | 41 | 0 | 97 |
JSON | 3 | 0 | 0 | 61 |
Bourne Shell | 1 | 0 | 0 | 5 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 13.33 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 46.00 |
Average method complexity | 2.56 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 71 | |
▷ Static methods | 15 | 21.13% |
▷ Public methods | 61 | 85.92% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 10 | 14.08% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 4 | 100.00% |
▷ 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