Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.02MB] [CPU: ▲0.08ms] Passed 4 tests
This is a short check of server-side resources used by Post Hits Counter
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 41.76 ▲0.58 |
Dashboard /wp-admin | 3.32 ▲0.02 | 46.00 ▼1.91 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 45.56 ▲1.00 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.02 | 90.23 ▲6.80 |
Media Library /wp-admin/upload.php | 3.24 ▲0.02 | 32.96 ▲0.65 |
Hits Counter /wp-admin/admin.php?page=post_hit_counter | 3.23 | 31.74 |
Hits Counter Setting /wp-admin/admin.php?page=hit_counter_setting | 3.21 | 29.57 |
Keyword Searches /wp-admin/admin.php?page=keyword_searches | 3.18 | 29.00 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_hitsCount |
New WordPress options |
---|
phc_version_ |
theysaidso_admin_options |
db_upgraded |
widget_theysaidso_widget |
recovery_mode_email_last_sent |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Post Hits Counter
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,830 ▲84 | 14.75 ▲0.44 | 1.68 ▼0.19 | 46.24 ▲1.75 |
Dashboard /wp-admin | 2,236 ▲48 | 5.88 ▲0.07 | 102.59 ▼12.99 | 40.74 ▼4.09 |
Posts /wp-admin/edit.php | 2,116 ▲24 | 2.06 ▲0.05 | 34.54 ▼1.39 | 33.61 ▼2.74 |
Add New Post /wp-admin/post-new.php | 1,563 ▲44 | 23.52 ▲0.32 | 594.39 ▼91.02 | 51.33 ▲2.08 |
Media Library /wp-admin/upload.php | 1,409 ▲21 | 4.16 ▲0.01 | 97.23 ▼1.90 | 43.56 ▼0.19 |
Hits Counter /wp-admin/admin.php?page=post_hit_counter | 864 | 2.06 | 28.77 | 29.30 |
Hits Counter Setting /wp-admin/admin.php?page=hit_counter_setting | 793 | 2.05 | 23.68 | 24.50 |
Keyword Searches /wp-admin/admin.php?page=keyword_searches | 701 | 1.53 | 7.06 | 22.06 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- The plugin did not uninstall successfully, leaving 1 table in the database
- wp_hitsCount
- Zombie WordPress options were found after uninstall: 8 options
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- recovery_mode_email_last_sent
- widget_recent-posts
- widget_theysaidso_widget
- phc_version_
- widget_recent-comments
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)
Please fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=keyword_searches
- > Error in wp-content/plugins/hits-counter/admin/PostHitCountClass.php+261
Uncaught Error: Call to undefined function handlePostData() in wp-content/plugins/hits-counter/admin/PostHitCountClass.php:261
Stack trace:
#0 wp-content/plugins/hits-counter/admin/PostHitCountClass.php(212): PostHitCount->fectchKeyword()
#1 wp-includes/class-wp-hook.php(310): PostHitCount->phcKeywordSearches()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/hits-counter/templates/phcKeywordSearches.php
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Class 'phcDataBaseClass' not found in wp-content/plugins/hits-counter/admin/ShowPostListingClass.php:3
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/hits-counter/templates/phcKeywordSearches.php on line 12
- > PHP Fatal error
Uncaught Error: Call to undefined function site_url() in wp-content/plugins/hits-counter/templates/phc-records-panel.php:28
- > PHP Notice
Undefined variable: result in wp-content/plugins/hits-counter/templates/phcKeywordSearches.php on line 12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== hits-counter ===
)
hits-counter/hits-counter.php Passed 13 tests
The primary PHP file in "Post Hits Counter" version 2.8.23 is used by WordPress to initiate all plugin functionality
123 characters long description:
A simple plugin for capturing hits on posts of your wordpress blog. Install it and see the hit records in your Admin Panel.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected564 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 87 | 58 | 561 |
Markdown | 1 | 1 | 0 | 3 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 18.33 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 29.00 |
Average method complexity | 3.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.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 | 20 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 13 | 65.00% |
▷ Protected methods | 1 | 5.00% |
▷ Private methods | 6 | 30.00% |
Functions | 3 | |
▷ Named functions | 3 | 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
No PNG images were found in this plugin