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
This plugin's installer ran successfully
Server metrics [RAM: ▲0.28MB] [CPU: ▼8.29ms] Passed 4 tests
Analyzing server-side resources used by CT Optimization
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.73 ▲0.27 | 36.73 ▼0.66 |
Dashboard /wp-admin | 3.66 ▲0.31 | 47.11 ▼21.83 |
Posts /wp-admin/edit.php | 3.71 ▲0.35 | 48.86 ▲0.80 |
Add New Post /wp-admin/post-new.php | 6.17 ▲0.28 | 84.69 ▼11.45 |
Media Library /wp-admin/upload.php | 3.52 ▲0.28 | 36.44 ▲2.46 |
Server storage [IO: ▲0.90MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
CT Optimization: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲44 | 14.31 ▼0.31 | 1.65 ▲0.04 | 37.16 ▼5.27 |
Dashboard /wp-admin | 2,211 ▲34 | 5.52 ▼0.17 | 83.30 ▼3.23 | 38.00 ▼0.02 |
Posts /wp-admin/edit.php | 2,116 ▲16 | 1.97 ▼0.03 | 33.81 ▼5.19 | 33.69 ▼3.41 |
Add New Post /wp-admin/post-new.php | 1,539 ▲11 | 22.87 ▼0.22 | 593.61 ▼149.82 | 54.11 ▼12.90 |
Media Library /wp-admin/upload.php | 1,416 ▲19 | 4.21 ▼0.02 | 93.50 ▼5.96 | 43.74 ▼0.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
- Zombie WordPress options detected upon uninstall: 6 options
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
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)
Good news, no errors were detected
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
The following issues need your attention
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Warning
Use of undefined constant CODETOT_OPTIMIZATION_PATH - assumed 'CODETOT_OPTIMIZATION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ct-optimization/admin/class-codetot-optimization-admin.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ct-optimization/admin/partials/display.php:14
- > PHP Warning
require_once(CODETOT_OPTIMIZATION_PATH/includes/class-codetot-admin-options-page.php): failed to open stream: No such file or directory in wp-content/plugins/ct-optimization/admin/class-codetot-optimization-admin.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ct-optimization/includes/class-codetot-optimization-assets.php:40
- > PHP Fatal error
require_once(): Failed opening required 'CODETOT_OPTIMIZATION_PATH/includes/class-codetot-admin-options-page.php' (include_path='.:/usr/share/php') in wp-content/plugins/ct-optimization/admin/class-codetot-optimization-admin.php on line 10
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: settings, codetot, compress, optimization
ct-optimization/codetot-optimization.php 85% from 13 tests
The entry point to "CT Optimization" version 1.0.16 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ct-optimization.php" instead of "codetot-optimization.php")
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
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
Good job! No executable or dangerous file extensions detected1,413 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 218 | 487 | 1,320 |
PO File | 1 | 32 | 45 | 89 |
JavaScript | 2 | 2 | 27 | 4 |
CSS | 1 | 0 | 4 | 0 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 27.75 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 144.00 |
Average method complexity | 4.37 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 50.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 67 | |
▷ Static methods | 6 | 8.96% |
▷ Public methods | 57 | 85.07% |
▷ Protected methods | 9 | 13.43% |
▷ Private methods | 1 | 1.49% |
Functions | 14 | |
▷ Named functions | 3 | 21.43% |
▷ Anonymous functions | 11 | 78.57% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.80MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-128x128.png | 4.50KB | 1.89KB | ▼ 57.94% |
assets/banner-772x250.png | 180.69KB | 72.90KB | ▼ 59.65% |
assets/banner-1544x500.png | 558.08KB | 227.93KB | ▼ 59.16% |
assets/icon-256x256.png | 9.14KB | 3.84KB | ▼ 58.02% |
assets/screenshot-1.png | 66.04KB | 30.46KB | ▼ 53.89% |