Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/news-cpt/news-cpt.php+95
Methods with the same name as their class will not be constructors in a future version of PHP; News_CTP_Widget has a deprecated constructor
Server metrics [RAM: ▼1.84MB] [CPU: ▼52.05ms] Passed 4 tests
This is a short check of server-side resources used by News CPT
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.15 ▼1.31 | 9.42 ▼36.63 |
Dashboard /wp-admin | 2.17 ▼1.14 | 5.49 ▼44.50 |
Posts /wp-admin/edit.php | 2.17 ▼1.19 | 6.87 ▼38.71 |
Add New Post /wp-admin/post-new.php | 2.17 ▼3.72 | 6.98 ▼88.36 |
Media Library /wp-admin/upload.php | 2.17 ▼1.06 | 5.52 ▼29.03 |
News /wp-admin/edit.php?post_type=news | 2.17 | 5.64 |
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=news | 2.17 | 7.30 |
Add News Item /wp-admin/post-new.php?post_type=news | 2.17 | 6.75 |
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=news | 2.17 | 6.28 |
Server storage [IO: ▲0.56MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
widget_news_cpt_widget |
db_upgraded |
can_compress_scripts |
category_children |
Browser metrics Passed 4 tests
Checking browser requirements for News CPT
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,837 ▲102 | 13.15 ▼1.15 | 1.81 ▼0.06 | 42.72 ▼12.13 |
Dashboard /wp-admin | 2,240 ▲52 | 5.82 ▼0.05 | 111.69 ▼6.66 | 79.97 ▲32.01 |
Posts /wp-admin/edit.php | 2,129 ▲37 | 1.98 ▼0.04 | 39.35 ▼1.03 | 36.21 ▲2.09 |
Add New Post /wp-admin/post-new.php | 1,552 ▲19 | 23.11 ▼0.07 | 684.72 ▼10.22 | 66.93 ▲14.25 |
Media Library /wp-admin/upload.php | 1,416 ▲34 | 4.13 ▼0.08 | 101.51 ▼0.47 | 68.44 ▲23.48 |
News /wp-admin/edit.php?post_type=news | 1,139 | 1.94 | 32.74 | 29.12 |
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=news | 1,341 | 2.13 | 26.14 | 32.22 |
Add News Item /wp-admin/post-new.php?post_type=news | 2,409 | 7.72 | 179.18 | 127.09 |
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=news | 1,477 | 2.14 | 26.41 | 34.02 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% 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
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/news-cpt/news-cpt.php+95
Methods with the same name as their class will not be constructors in a future version of PHP; News_CTP_Widget has a deprecated constructor
- Zombie WordPress options detected upon uninstall: 8 options
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_news_cpt_widget
- category_children
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
- 5 occurences, only the last one shown
- > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=news
- > Deprecated in wp-content/plugins/news-cpt/news-cpt.php+95
Methods with the same name as their class will not be constructors in a future version of PHP; News_CTP_Widget has a deprecated constructor
- 5 occurences, only the last one shown
- > GET request to /wp-admin/edit-tags.php?taxonomy=category&post_type=news
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in News_CTP_Widget is deprecated since version 4.3.0! Use __construct() instead.
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 fix the following items
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/news-cpt/news-cpt.php:36
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/news-cpt/views/archive-news.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function get_header() in wp-content/plugins/news-cpt/views/single-news.php:8
- > PHP Fatal error
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)
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
- Screenshots: These screenshots require images: #1 (The News tab in the admin menu), #2 (The News tab open to the admin list of News items), #3 (Editing an individual News item), #4 (The Recent News CPT Widget)
news-cpt/news-cpt.php 92% from 13 tests
"News CPT" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 408 characters long)
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
Success! There were no dangerous files found in this plugin336 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 78 | 73 | 336 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 7.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 7.00 |
Average method complexity | 2.50 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.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 | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 7 | |
▷ Named functions | 7 | 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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.53MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-4.png | 166.55KB | 47.03KB | ▼ 71.76% |
screenshot-2.png | 94.48KB | 26.88KB | ▼ 71.55% |
screenshot-1.png | 117.78KB | 34.98KB | ▼ 70.30% |
screenshot-3.png | 167.97KB | 51.54KB | ▼ 69.31% |
images/newspaper.png | 0.57KB | 0.58KB | 0.00% |