Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.16MB] [CPU: ▼6.70ms] Passed 4 tests
A check of server-side resources used by CNews
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.60 ▲0.14 | 41.74 ▼0.76 |
Dashboard /wp-admin | 3.46 ▲0.15 | 50.93 ▼2.74 |
Posts /wp-admin/edit.php | 3.57 ▲0.21 | 43.87 ▼7.85 |
Add New Post /wp-admin/post-new.php | 6.25 ▲0.36 | 81.90 ▼15.46 |
Media Library /wp-admin/upload.php | 3.38 ▲0.15 | 39.14 ▲2.06 |
CNews /wp-admin/options-general.php?page=cnews-settings | 3.32 | 30.65 |
Server storage [IO: ▲0.70MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
cnews_settings |
can_compress_scripts |
Browser metrics Passed 4 tests
A check of browser resources used by CNews
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,844 ▲58 | 13.30 ▼0.91 | 1.94 ▼0.02 | 41.50 ▼4.58 |
Dashboard /wp-admin | 2,225 ▲22 | 5.88 ▲1.01 | 100.79 ▼14.23 | 40.18 ▼2.66 |
Posts /wp-admin/edit.php | 2,101 ▲4 | 2.02 ▼0.01 | 39.39 ▲3.51 | 35.42 ▼0.25 |
Add New Post /wp-admin/post-new.php | 6,679 ▲5,129 | 22.22 ▲3.76 | 927.37 ▲235.71 | 125.96 ▲68.03 |
Media Library /wp-admin/upload.php | 1,404 ▲4 | 4.25 ▼0.04 | 98.45 ▼8.62 | 41.25 ▼3.68 |
CNews /wp-admin/options-general.php?page=cnews-settings | 983 | 2.05 | 24.92 | 30.91 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
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
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=cnews-settings
- > Warning in wp-admin/includes/template.php+1824
call_user_func() expects parameter 1 to be a valid callback, class 'SettingsCtrl' does not have a method 'render_input_field'
- 11 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=cnews-settings
- > Notice in wp-content/plugins/cnews/controller/class-settings-ctrl.php+262
Undefined index: field_id
- 11 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=cnews-settings
- > Notice in wp-content/plugins/cnews/controller/class-settings-ctrl.php+264
Undefined variable: value
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
Please take a closer look at the following
- 4× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/cnews/view/view-news-email-form-meta-box.php:19
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/cnews/view/view-user-profile-field.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cnews/util/class-admin-notice-utility.php:65
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/cnews/view/view-emails-sent-meta-box.php:57
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
- Screenshots: Add descriptions for screenshots #4, #0, #0, #0, #0 in cnews/assets to your readme.txt
cnews/cnews.php Passed 13 tests
This is the main PHP file of "CNews" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
125 characters long description:
Send out html emails to user groups from the add/edit post screens, and view emails sent out from that post on the same page.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected972 lines of code in 18 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 328 | 769 | 714 |
PO File | 1 | 35 | 37 | 114 |
CSS | 1 | 20 | 5 | 91 |
JSON | 1 | 0 | 0 | 19 |
Markdown | 1 | 15 | 0 | 19 |
JavaScript | 1 | 7 | 4 | 15 |
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.29 |
Average class complexity | 8.12 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 26.00 |
Average method complexity | 2.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 21.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 57 | |
▷ Static methods | 4 | 7.02% |
▷ Public methods | 52 | 91.23% |
▷ Protected methods | 1 | 1.75% |
▷ Private methods | 4 | 7.02% |
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 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.61MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot3.png | 44.09KB | 13.17KB | ▼ 70.14% |
screenshot-4.png | 111.02KB | 31.98KB | ▼ 71.20% |
screenshot-1.png | 60.84KB | 17.39KB | ▼ 71.42% |
screenshot1.png | 60.84KB | 17.39KB | ▼ 71.42% |
screenshot-2.png | 44.09KB | 13.17KB | ▼ 70.14% |