Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/content-glass-button/core/HtmlElement.php+12
Methods with the same name as their class will not be constructors in a future version of PHP; HtmlElement has a deprecated constructor
Server metrics [RAM: ▼1.84MB] [CPU: ▼48.85ms] Passed 4 tests
Server-side resources used by CG Button
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.14 ▼1.32 | 5.55 ▼36.75 |
Dashboard /wp-admin | 2.16 ▼1.14 | 7.71 ▼42.14 |
Posts /wp-admin/edit.php | 2.17 ▼1.19 | 8.33 ▼36.68 |
Add New Post /wp-admin/post-new.php | 2.17 ▼3.72 | 6.62 ▼79.81 |
Media Library /wp-admin/upload.php | 2.17 ▼1.06 | 13.33 ▼22.22 |
CG Button /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php | 2.16 | 7.52 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
widget_cgbutton_widget |
theysaidso_admin_options |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for CG Button
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,823 ▲88 | 13.25 ▼1.12 | 1.89 ▼0.13 | 40.34 ▼9.47 |
Dashboard /wp-admin | 2,212 ▲21 | 5.79 ▲0.87 | 95.19 ▼11.29 | 39.03 ▼4.57 |
Posts /wp-admin/edit.php | 2,093 ▲7 | 1.97 ▼0.04 | 33.34 ▼4.37 | 31.97 ▼2.59 |
Add New Post /wp-admin/post-new.php | 1,535 ▲2 | 21.04 ▼2.24 | 627.66 ▼55.90 | 60.43 ▲3.83 |
Media Library /wp-admin/upload.php | 1,392 ▲1 | 4.06 ▼0.15 | 97.22 ▼2.50 | 41.39 ▼3.28 |
CG Button /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php | 1,027 | 2.17 | 22.73 | 30.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/content-glass-button/core/HtmlElement.php+12
Methods with the same name as their class will not be constructors in a future version of PHP; HtmlElement has a deprecated constructor
- Zombie WordPress options were found after uninstall: 7 options
- widget_recent-comments
- widget_cgbutton_widget
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > Deprecated in wp-content/plugins/content-glass-button/core/HtmlElement.php+12
Methods with the same name as their class will not be constructors in a future version of PHP; HtmlElement has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > Deprecated in wp-content/plugins/content-glass-button/core/CG-Button-widget.php+25
Methods with the same name as their class will not be constructors in a future version of PHP; CgButtonWidget has a deprecated constructor
- 6 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > Notice in wp-content/plugins/content-glass-button/utils/ModuleUtils.php+181
Trying to get property 'status' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > Notice in wp-content/plugins/content-glass-button/utils/ModuleUtils.php+273
Undefined property: stdClass::$button
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > Notice in wp-content/plugins/content-glass-button/utils/ModuleUtils.php+275
Trying to get property 'app_id' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > Notice in wp-content/plugins/content-glass-button/core/CG-Button-menu-link.php+59
Trying to get property 'http_code' of non-object
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > Notice in wp-content/plugins/content-glass-button/core/CG-Button-menu-link.php+70
Trying to get property 'message' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in CgButtonWidget is deprecated since version 4.3.0! Use __construct() instead.
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > User notice in wp-includes/functions.php+5905
Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=content-glass-button/core/CG-Button-init.php
- > Notice in wp-content/plugins/content-glass-button/utils/ModuleUtils.php+203
Trying to get property 'name' of non-object
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
Almost there! Just fix the following items
- 4× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/content-glass-button/templates/CustomizeButtonScript.php
- > /wp-content/plugins/content-glass-button/CG-button-plugin.php
- > /wp-content/plugins/content-glass-button/core/CG-Button-init.php
- > /wp-content/plugins/content-glass-button/templates/ContentGlassSystemScripts.php
- 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Notice
Undefined index: CG_SERVER in wp-content/plugins/content-glass-button/templates/ContentGlassSystemScripts.php on line 32
- > PHP Notice
Undefined index: label in wp-content/plugins/content-glass-button/templates/CustomizeButtonScript.php on line 3
- > PHP Notice
Undefined index: APP_DATA in wp-content/plugins/content-glass-button/templates/ContentGlassSystemScripts.php on line 2
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/content-glass-button/utils/ModuleUtils.php on line 51
- > PHP Notice
Undefined index: style in wp-content/plugins/content-glass-button/templates/CustomizeButtonScript.php on line 5
- > PHP Notice
Undefined index: XDEBUG in wp-content/plugins/content-glass-button/templates/ContentGlassSystemScripts.php on line 25
- > PHP Notice
Undefined index: SESSION_ID in wp-content/plugins/content-glass-button/templates/ContentGlassSystemScripts.php on line 32
- > PHP Notice
Undefined index: APP_ID in wp-content/plugins/content-glass-button/templates/ContentGlassSystemScripts.php on line 32
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/content-glass-button/core/CG-Button-widget.php:25
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/content-glass-button/utils/ModuleUtils.php on line 51
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== content-glass-button ===
)
content-glass-button/CG-button-plugin.php 92% from 13 tests
The main file in "CG Button" v. 1.0.5.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("content-glass-button.php" instead of "CG-button-plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,266 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 126 | 227 | 622 |
JavaScript | 2 | 56 | 134 | 471 |
HTML | 4 | 3 | 13 | 110 |
CSS | 2 | 12 | 5 | 63 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.16 |
Average class complexity | 6.40 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 17.00 |
Average method complexity | 1.90 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 5 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 30 | |
▷ Static methods | 12 | 40.00% |
▷ Public methods | 29 | 96.67% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 3.33% |
Functions | 13 | |
▷ Named functions | 12 | 92.31% |
▷ Anonymous functions | 1 | 7.69% |
Constants | 40 | |
▷ Global constants | 39 | 97.50% |
▷ Class constants | 1 | 2.50% |
▷ Public constants | 1 | 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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/cg60.png | 6.38KB | 3.20KB | ▼ 49.82% |
images/cg17.png | 0.94KB | 1.03KB | 0.00% |