Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Notice in wp-content/plugins/comment-pub/comment_pub.php+58
Trying to access array offset on value of type bool
Server metrics [RAM: ▼1.96MB] [CPU: ▼52.31ms] Passed 4 tests
An overview of server-side resources used by Comment Pub
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.03 ▼1.43 | 4.82 ▼36.60 |
Dashboard /wp-admin | 2.05 ▼1.26 | 6.38 ▼47.20 |
Posts /wp-admin/edit.php | 2.05 ▼1.31 | 6.65 ▼39.40 |
Add New Post /wp-admin/post-new.php | 2.05 ▼3.84 | 6.23 ▼86.05 |
Media Library /wp-admin/upload.php | 2.05 ▼1.18 | 7.85 ▼25.70 |
All Comments /wp-admin/edit-comments.php | 2.05 | 5.84 |
Comment Pub /wp-admin/edit-comments.php?page=comment_pub_sorting | 2.05 | 8.59 |
Comment Pub Options /wp-admin/options-general.php?page=comment_pub_options | 2.05 | 7.28 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
nmg_comment_pub |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Comment Pub
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,823 ▲88 | 13.79 ▼0.50 | 1.62 ▼0.17 | 40.08 ▼1.69 |
Dashboard /wp-admin | 2,226 ▲37 | 5.79 ▼0.15 | 106.02 ▼5.16 | 40.97 ▼7.45 |
Posts /wp-admin/edit.php | 2,112 ▲23 | 2.00 ▼0.04 | 39.63 ▼1.96 | 34.85 ▲0.55 |
Add New Post /wp-admin/post-new.php | 1,551 ▲37 | 23.36 ▲5.87 | 599.02 ▼81.55 | 54.01 ▲10.10 |
Media Library /wp-admin/upload.php | 1,414 ▲23 | 4.25 ▲0.08 | 98.34 ▲0.50 | 40.82 ▼4.63 |
All Comments /wp-admin/edit-comments.php | 1,818 | 2.30 | 35.86 | 36.49 |
Comment Pub /wp-admin/edit-comments.php?page=comment_pub_sorting | 1,228 | 2.07 | 23.29 | 31.52 |
Comment Pub Options /wp-admin/options-general.php?page=comment_pub_options | 900 | 2.07 | 25.41 | 32.69 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- nmg_comment_pub
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
Smoke tests 50% 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)
Almost there, just fix the following server-side errors
- 6 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=comment_pub_options
- > Notice in wp-content/plugins/comment-pub/comment_pub.php+80
Trying to access array offset on value of type bool
- > GET request to /wp-admin/edit-comments.php?page=comment_pub_sorting
- > User notice in wp-includes/functions.php+5905
Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
- > GET request to /wp-admin/edit-comments.php?page=comment_pub_sorting
- > User notice in wp-includes/functions.php+5905
Function wpdb::prepare was called incorrectly. The query does not contain the correct number of placeholders (0) for the number of arguments passed (2). Please see Debugging in WordPress for more information. (This message was added in version 4.8.3.)
- > GET request to /wp-admin/edit-comments.php?page=comment_pub_sorting
- > Notice in wp-content/plugins/comment-pub/comments_pub_sorting.php+689
Undefined variable: comment_status
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=comment_pub_options
- > Notice in wp-content/plugins/comment-pub/comments_pub_admin.php+214
Undefined variable: loveShare
SRP 50% 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
Please take a closer look at the following
- 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/comment-pub/comments_pub_sorting.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function post_password_required() in wp-content/plugins/comment-pub/comments_pub_comments.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/comment-pub/comment_pub_page.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/comment-pub/comments_pub_admin.php:6
- > PHP Warning
require_once(ABSPATHwp-admin/admin.php): failed to open stream: No such file or directory in wp-content/plugins/comment-pub/comments_pub_sorting.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/comment-pub/comment_pub.php:42
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/comment-pub/comments_pub_sorting.php on line 2
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: image upload, resize images, guestbook, guest, comments
comment-pub/comment_pub.php 85% from 13 tests
The main PHP file in "Comment Pub" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Description: Please don't use more than 140 characters for the plugin description (currently 421 characters long)
- Main file name: The principal plugin file should be the same as the plugin slug ("comment-pub.php" instead of "comment_pub.php")
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
Good job! No executable or dangerous file extensions detected1,038 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 496 | 520 | 944 |
CSS | 2 | 2 | 4 | 64 |
JavaScript | 2 | 18 | 5 | 30 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 20.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 40.00 |
Average method complexity | 3.11 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 13.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 38 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 36 | 94.74% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 2 | 5.26% |
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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected