Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
- The plugin cannot be installed
- > Notice in wp-content/plugins/mobile-theme/mobile-theme.php+144
Trying to access array offset on value of type bool
Server metrics [RAM: ▲0.02MB] [CPU: ▼5.23ms] Passed 4 tests
Analyzing server-side resources used by Mobile Theme
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 36.29 ▼7.89 |
Dashboard /wp-admin | 3.33 ▲0.02 | 44.56 ▼1.31 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 46.31 ▼1.89 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 80.70 ▼9.84 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 35.14 ▲0.63 |
Mobile Theme /wp-admin/themes.php?page=mobile-theme/mobile-theme.php | 3.21 | 28.67 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
widget_recent-comments |
mobile_theme_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Mobile Theme
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲47 | 14.40 ▼0.35 | 1.68 ▼0.53 | 39.34 ▼14.42 |
Dashboard /wp-admin | 2,210 ▲19 | 4.86 ▼1.05 | 111.57 ▲0.21 | 42.14 ▲1.54 |
Posts /wp-admin/edit.php | 2,093 ▲1 | 2.11 ▲0.09 | 38.57 ▲4.74 | 36.26 ▲3.34 |
Add New Post /wp-admin/post-new.php | 1,545 ▲31 | 18.18 ▲0.63 | 624.40 ▼60.06 | 50.15 ▼1.25 |
Media Library /wp-admin/upload.php | 1,395 ▲4 | 4.19 ▼0.00 | 95.65 ▼8.00 | 43.22 ▼2.11 |
Mobile Theme /wp-admin/themes.php?page=mobile-theme/mobile-theme.php | 840 | 2.05 | 26.33 | 27.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/themes.php?page=mobile-theme/mobile-theme.php
- > Notice in wp-content/plugins/mobile-theme/mobile-theme.php+341
Undefined variable: mobile_theme_disabled_message
SRP 50% 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
The following issues need your attention
- 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/mobile-theme/mobile-theme.php on line 13
- > PHP Warning
include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/mobile-theme/mobile-theme.php on line 13
- > PHP Fatal error
Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/mobile-theme/mobile-theme.php:69
- > PHP Warning
include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/mobile-theme/mobile-theme.php on line 13
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
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
No tags were found
mobile-theme/mobile-theme.php Passed 13 tests
"Mobile Theme" version 1.3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
134 characters long description:
This plugin switches the current theme to the mobile one when it detects a mobile device. This plugin works only on Presslabs servers!
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 plugin294 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 54 | 19 | 294 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 20 | |
▷ Named functions | 20 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
PNG images were not found in this plugin