Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.04MB] [CPU: ▼7.46ms] Passed 4 tests
Analyzing server-side resources used by Live Visitor Counter
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.04 | 37.60 ▼5.57 |
Dashboard /wp-admin | 3.35 ▲0.04 | 51.58 ▼3.18 |
Posts /wp-admin/edit.php | 3.47 ▲0.11 | 57.05 ▲7.35 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 84.61 ▼22.82 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 34.96 ▲1.73 |
Server storage [IO: ▲0.94MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_visitors_stat |
New WordPress options |
---|
theysaidso_admin_options |
widget_visitors_widget |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Live Visitor Counter
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,070 ▲313 | 15.52 ▲0.89 | 5.31 ▲3.14 | 42.12 ▲2.75 |
Dashboard /wp-admin | 2,357 ▲172 | 6.50 ▲0.62 | 123.02 ▲17.59 | 41.21 ▼4.08 |
Posts /wp-admin/edit.php | 2,257 ▲168 | 3.33 ▲1.29 | 47.55 ▲7.22 | 30.79 ▼6.81 |
Add New Post /wp-admin/post-new.php | 1,534 ▼1 | 23.10 ▲0.05 | 665.60 ▲16.56 | 36.06 ▼18.25 |
Media Library /wp-admin/upload.php | 1,468 ▲80 | 4.19 ▲0.01 | 86.69 ▼17.74 | 43.82 ▲3.39 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- The uninstall procedure has failed, leaving 7 options in the database
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_visitors_widget
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
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
The smoke test was a success, however most plugin functionality was not tested
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 6× PHP files trigger errors when accessed directly with GET requests:
- > PHP Warning
Use of undefined constant DAY_IN_SECONDS - assumed 'DAY_IN_SECONDS' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-visitors-widget/modules/hooks.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/wp-visitors-widget/wp-visitors-widget.php:72
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-visitors-widget/modules/widgets.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-visitors-widget/modules/hooks.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-visitors-widget/modules/scripts.php:73
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-visitors-widget/modules/shortcodes.php:2
- > 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 Passed 29 tests
readme.txt Passed 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: click counter, marketing, wordpress visitor counter
wp-visitors-widget/wp-visitors-widget.php Passed 13 tests
The main file in "Live Visitor Counter" v. 2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
72 characters long description:
Adds a widget showing the visitor how many live visitors is on the page.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin17,269 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 6 | 1,087 | 136 | 14,675 |
JavaScript | 4 | 536 | 337 | 1,350 |
PHP | 6 | 183 | 24 | 1,237 |
SVG | 1 | 0 | 0 | 7 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 13.67 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 24.00 |
Average method complexity | 5.22 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 10 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 6 | |
▷ Named functions | 4 | 66.67% |
▷ Anonymous functions | 2 | 33.33% |
Constants | 0 | |
▷ Global constants | 0 | 0.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
5 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
modules/inc/assets/css/glyphicons-halflings-white.png | 8.57KB | 9.20KB | 0.00% |
modules/inc/assets/css/glyphicons-halflings.png | 12.50KB | 10.35KB | ▼ 17.19% |
modules/images/logo-dark-copy-2.png | 2.47KB | 2.57KB | 0.00% |
modules/inc/assets/img/glyphicons-halflings.png | 12.50KB | 10.35KB | ▼ 17.19% |
modules/inc/assets/img/glyphicons-halflings-white.png | 8.57KB | 9.20KB | 0.00% |