Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.70MB] [CPU: ▼336.43ms] Passed 4 tests
This is a short check of server-side resources used by Mega Ad
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.77 | 36.83 ▲15.96 |
Dashboard /wp-admin | 3.77 ▲0.72 | 46.41 ▲11.39 |
Posts /wp-admin/edit.php | 3.80 ▲0.69 | 47.24 ▲6.08 |
Add New Post /wp-admin/post-new.php | 6.13 ▲0.70 | 94.88 ▼1,358.62 |
Media Library /wp-admin/upload.php | 3.71 ▲0.71 | 36.32 ▼4.57 |
Mega Ads /wp-admin/edit.php?post_type=mega-ad | 3.76 | 33.55 |
Add New /wp-admin/post-new.php?post_type=mega-ad | 4.12 | 52.45 |
Server storage [IO: ▲3.59MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 203 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Mega Ad: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,725 ▲119 | 15.90 ▲0.41 | 7.84 ▼1.49 | 46.43 ▼3.06 |
Dashboard /wp-admin | 2,997 ▲147 | 6.23 ▲0.46 | 143.22 ▼11.45 | 102.22 ▼3.07 |
Posts /wp-admin/edit.php | 2,754 ▲51 | 2.71 ▲0.03 | 65.73 ▲2.71 | 88.13 ▼1.14 |
Add New Post /wp-admin/post-new.php | 1,683 ▲30 | 18.86 ▲0.12 | 375.73 ▲10.15 | 111.75 ▲4.53 |
Media Library /wp-admin/upload.php | 1,823 ▲51 | 5.07 ▲0.06 | 157.63 ▼19.50 | 110.32 ▼9.66 |
Mega Ads /wp-admin/edit.php?post_type=mega-ad | 1,411 | 2.65 | 64.03 | 67.40 |
Add New /wp-admin/post-new.php?post_type=mega-ad | 2,332 | 4.59 | 118.16 | 87.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
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 fix the following items
- 41× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/CMB2_Field.php:17
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/rest-api/CMB2_REST.php:19
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/types/CMB2_Type_Textarea.php:13
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mega-ad/inc/cmb2/example-functions.php:105
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/types/CMB2_Type_Text.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/types/CMB2_Type_File_Base.php:13
- > PHP Fatal error
Uncaught Error: Class 'CMB2_Type_Picker_Base' not found in wp-content/plugins/mega-ad/inc/cmb2/includes/types/CMB2_Type_Text_Date.php:13
- > 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 93% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
- Plugin Name: Please specify the plugin name on the first line (
=== mega-ad ===
)
mega-ad/mega-ad-plugin.php 92% from 13 tests
The entry point to "Mega Ad" version 1.1.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("mega-ad.php" instead of "mega-ad-plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected37,462 lines of code in 164 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 94 | 11,218 | 14,506 | 25,272 |
PHP | 57 | 2,085 | 6,056 | 6,993 |
SVG | 1 | 0 | 3 | 2,227 |
CSS | 4 | 522 | 308 | 1,321 |
JavaScript | 6 | 280 | 269 | 1,039 |
Markdown | 2 | 207 | 0 | 610 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 18.48 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 181.00 |
Average method complexity | 3.24 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 28.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 66 | |
▷ Abstract classes | 8 | 12.12% |
▷ Concrete classes | 58 | 87.88% |
▷ Final classes | 0 | 0.00% |
Methods | 518 | |
▷ Static methods | 86 | 16.60% |
▷ Public methods | 427 | 82.43% |
▷ Protected methods | 88 | 16.99% |
▷ Private methods | 3 | 0.58% |
Functions | 38 | |
▷ Named functions | 38 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 4 | 40.00% |
▷ Class constants | 6 | 60.00% |
▷ Public constants | 6 | 100.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
Using a strong compression for your PNG files is a great way to speed-up your plugin
18 compressed PNG files occupy 0.93MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/cmb2/images/ui-icons_888888_256x240.png | 5.23KB | 4.11KB | ▼ 21.49% |
assets/images/close-message.png | 0.82KB | 0.80KB | ▼ 2.73% |
assets/images/screenshot-1.png | 0.00KB | 0.00KB | 0.00% |
inc/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png | 0.12KB | 0.14KB | 0.00% |
inc/cmb2/images/ui-bg_glass_75_dadada_1x400.png | 0.11KB | 0.16KB | 0.00% |