Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼1.93MB] [CPU: ▼51.68ms] Passed 4 tests
This is a short check of server-side resources used by Hit Counter
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.06 ▼1.40 | 5.59 ▼37.22 |
Dashboard /wp-admin | 2.08 ▼1.23 | 5.78 ▼39.56 |
Posts /wp-admin/edit.php | 2.08 ▼1.28 | 6.49 ▼43.90 |
Add New Post /wp-admin/post-new.php | 2.08 ▼3.81 | 6.12 ▼86.02 |
Media Library /wp-admin/upload.php | 2.08 ▼1.15 | 5.40 ▼28.37 |
Server storage [IO: ▲0.20MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables |
---|
wp_hitscounter |
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Hit Counter
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,934 ▲177 | 13.62 ▼0.78 | 6.00 ▲3.83 | 28.25 ▼20.08 |
Dashboard /wp-admin | 2,224 ▲33 | 4.84 ▼0.04 | 106.95 ▲0.59 | 47.04 ▲3.42 |
Posts /wp-admin/edit.php | 2,107 ▲21 | 2.02 ▲0.06 | 37.61 ▲2.63 | 38.10 ▲1.04 |
Add New Post /wp-admin/post-new.php | 1,684 ▲151 | 22.17 ▲3.67 | 665.27 ▲24.87 | 61.72 ▲10.04 |
Media Library /wp-admin/upload.php | 1,406 ▲15 | 4.18 ▲0.00 | 109.55 ▲13.73 | 54.19 ▲11.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin cannot be uninstalled
- > User notice in wp-includes/functions.php+5905
Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the bootstrap handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Notice
Undefined variable: wpdb in wp-content/plugins/count-hits/hitscounter-admin.php on line 6
- > PHP Fatal error
Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/count-hits/hitscounter-admin.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/count-hits/index.php:19
- > PHP Notice
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, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: hits, count, hits counter, hits count, counter
count-hits/index.php 77% from 13 tests
The main file in "Hit Counter" v. 20180820... 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: Please rename the main PHP file in this plugin to the plugin slug ("count-hits.php" instead of "index.php")
- Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "20180820...")
- 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 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected140 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 35 | 28 | 119 |
CSS | 2 | 0 | 6 | 20 |
JavaScript | 1 | 0 | 6 | 1 |
PHP code Passed 2 tests
This is a very shot 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.06 |
Average class complexity | 1.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1.00 |
Average method complexity | 1.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 1.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 2 | |
▷ Static methods | 2 | 100.00% |
▷ Public methods | 2 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/logo.png | 28.71KB | 6.80KB | ▼ 76.31% |