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
You still need to fix the following installer errors
- Install procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-widget.php+216
Function create_function() is deprecated
Server metrics [RAM: ▼1.68MB] [CPU: ▼51.88ms] Passed 4 tests
Server-side resources used by WP Anniversary
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.31 ▼1.15 | 6.15 ▼33.17 |
Dashboard /wp-admin | 2.33 ▼0.97 | 12.18 ▼33.68 |
Posts /wp-admin/edit.php | 2.33 ▼1.02 | 7.60 ▼46.07 |
Add New Post /wp-admin/post-new.php | 2.33 ▼3.55 | 7.86 ▼94.59 |
Media Library /wp-admin/upload.php | 2.33 ▼0.90 | 7.67 ▼27.26 |
WP Anniversary /wp-admin/options-general.php?page=wp-anniversary/admin/index.php | 2.33 | 7.05 |
Server storage [IO: ▲0.40MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 12 new options
New WordPress options |
---|
widget_wp-anniversary |
wp-anniversary-version |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
wp-anniversary-last_update |
widget_recent-posts |
db_upgraded |
iworks_cache_stamp |
theysaidso_admin_options |
... |
Browser metrics Passed 4 tests
Checking browser requirements for WP Anniversary
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,811 ▲76 | 13.16 ▼1.60 | 1.76 ▼0.05 | 39.04 ▼7.04 |
Dashboard /wp-admin | 2,214 ▲32 | 5.80 ▲0.90 | 97.17 ▼9.44 | 38.18 ▼1.80 |
Posts /wp-admin/edit.php | 2,099 ▲10 | 2.00 ▼0.05 | 41.46 ▲3.98 | 38.82 ▲7.62 |
Add New Post /wp-admin/post-new.php | 1,545 ▲12 | 23.36 ▲0.24 | 672.37 ▲59.69 | 52.75 ▼28.70 |
Media Library /wp-admin/upload.php | 1,393 ▲8 | 4.22 ▲0.02 | 103.57 ▼2.91 | 41.67 ▼3.23 |
WP Anniversary /wp-admin/options-general.php?page=wp-anniversary/admin/index.php | 1,022 | 2.52 | 36.60 | 24.57 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-widget.php+216
Function create_function() is deprecated
- Zombie WordPress options were found after uninstall: 12 options
- wp-anniversary-last_update
- db_upgraded
- iworks_cache_stamp
- widget_recent-comments
- widget_wp-anniversary
- widget_wp-anniversary-city-list
- widget_theysaidso_widget
- wp-anniversary-version
- widget_recent-posts
- can_compress_scripts
- ...
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)
These server-side errors were triggered
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Deprecated in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-meetup-widget.php+190
Function create_function() is deprecated
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-options.php+48
Accessing static property IworksOptions::$version as non static
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+186
Accessing static property iWorks_WP_Anniversary::$see_all as non static
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+167
Accessing static property iWorks_WP_Anniversary::$version as non static
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+49
Accessing static property iWorks_WP_Anniversary::$base as non static
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+102
Accessing static property iWorks_WP_Anniversary::$dir as non static
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+130
Accessing static property iWorks_WP_Anniversary::$capability as non static
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+245
Trying to get property 'error' of non-object
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+245
Trying to get property 'code' of non-object
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Notice in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary.php+245
Trying to get property 'message' of non-object
- > GET request to /wp-admin/options-general.php?page=wp-anniversary/admin/index.php
- > Warning in wp-content/plugins/wp-anniversary/admin/index.php+29
count(): Parameter must be an array or an object that implements Countable
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/wp-anniversary/admin/index.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-meetup-widget.php:22
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-anniversary/includes/class-iworks-wp-anniversary-widget.php:22
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
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
Please fix the following attributes:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Site), #2 (Widget configuration), #3 (Widget), #4 (Widget with square logo)
wp-anniversary/wp-anniversary.php Passed 13 tests
This is the main PHP file of "WP Anniversary" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
36 characters long description:
WordPress Anniversary widget, badge.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,284 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 138 | 272 | 1,144 |
PO File | 1 | 55 | 70 | 140 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Method cyclomatic complexity should be reduced to less than 100 (currently 150)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.56 |
Average class complexity | 61.50 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 190.00 |
Average method complexity | 6.90 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 150.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 | 41 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 36 | 87.80% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 12.20% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.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
6 PNG files occupy 0.32MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-4.png | 63.15KB | 29.47KB | ▼ 53.33% |
screenshot-3.png | 79.07KB | 33.31KB | ▼ 57.88% |
images/10th-square.png | 1.93KB | 1.94KB | 0.00% |
screenshot-1.png | 144.23KB | 60.16KB | ▼ 58.29% |
images/10th.png | 5.31KB | 5.41KB | 0.00% |