Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/demomentsomtres-promotions/demomentsomtres-promotions.php+82
Methods with the same name as their class will not be constructors in a future version of PHP; dmst_promotions_widget has a deprecated constructor
Server metrics [RAM: ▼1.90MB] [CPU: ▼56.68ms] Passed 4 tests
A check of server-side resources used by DeMomentSomTres Promotions
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.08 ▼1.38 | 4.76 ▼32.52 |
Dashboard /wp-admin | 2.10 ▼1.20 | 5.56 ▼58.89 |
Posts /wp-admin/edit.php | 2.10 ▼1.25 | 6.93 ▼46.06 |
Add New Post /wp-admin/post-new.php | 2.10 ▼3.78 | 6.14 ▼89.26 |
Media Library /wp-admin/upload.php | 2.10 ▼1.12 | 5.45 ▼28.12 |
Add Promotion /wp-admin/post-new.php?post_type=promotions | 2.10 | 5.94 |
Promo Types /wp-admin/edit-tags.php?taxonomy=promo-type&post_type=promotions | 2.11 | 6.00 |
Promotions /wp-admin/edit.php?post_type=promotions | 2.11 | 6.63 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
widget_dmst_promotions_widget |
Browser metrics Passed 4 tests
This is an overview of browser requirements for DeMomentSomTres Promotions
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,834 ▲88 | 13.71 ▼0.91 | 1.68 ▼0.05 | 43.27 ▲3.36 |
Dashboard /wp-admin | 2,237 ▲49 | 5.81 ▲0.71 | 95.02 ▼6.66 | 38.62 ▼1.00 |
Posts /wp-admin/edit.php | 2,117 ▲28 | 2.02 ▲0.03 | 35.52 ▼7.65 | 31.62 ▼0.39 |
Add New Post /wp-admin/post-new.php | 1,560 ▲18 | 23.39 ▲4.95 | 702.97 ▲93.88 | 55.63 ▲0.72 |
Media Library /wp-admin/upload.php | 1,419 ▲34 | 4.14 ▼0.04 | 111.07 ▲6.04 | 47.50 ▲4.19 |
Add Promotion /wp-admin/post-new.php?post_type=promotions | 2,799 | 7.74 | 176.10 | 72.40 |
Promo Types /wp-admin/edit-tags.php?taxonomy=promo-type&post_type=promotions | 1,290 | 2.13 | 26.51 | 28.70 |
Promotions /wp-admin/edit.php?post_type=promotions | 1,132 | 1.93 | 30.46 | 30.95 |
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
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/demomentsomtres-promotions/demomentsomtres-promotions.php+82
Methods with the same name as their class will not be constructors in a future version of PHP; dmst_promotions_widget has a deprecated constructor
- Zombie WordPress options detected upon uninstall: 7 options
- db_upgraded
- widget_dmst_promotions_widget
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
- 4 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=promotions
- > POST request to /wp-admin/admin-ajax.php
- > Deprecated in wp-content/plugins/demomentsomtres-promotions/demomentsomtres-promotions.php+82
Methods with the same name as their class will not be constructors in a future version of PHP; dmst_promotions_widget has a deprecated constructor
- 4 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=promotions
- > POST request to /wp-admin/admin-ajax.php
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in dmst_promotions_widget is deprecated since version 4.3.0! Use __construct() instead.
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 fix the following items
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/demomentsomtres-promotions/demomentsomtres-promotions.php:16
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: expiration, custom post-type, promotions
demomentsomtres-promotions/demomentsomtres-promotions.php Passed 13 tests
The entry point to "DeMomentSomTres Promotions" version 1.2.1 is a PHP file that has certain tags in its header comment area
48 characters long description:
Promotions custom post-type with expiration date
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin128 lines of code in 3 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 13 | 12 | 119 |
JavaScript | 1 | 0 | 8 | 9 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.09 |
Average class complexity | 4.00 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 4.00 |
Average method complexity | 1.75 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.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 | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 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
PNG images were not found in this plugin