Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.80MB] [CPU: ▼2.10ms] 75% from 4 tests
A check of server-side resources used by CM Ad Changer
The following require your attention
- CPU: The total CPU usage must kept under 500.00ms (currently 1,022.21ms on /wp-admin/admin.php?page=cmac_settings)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.24 ▲0.78 | 40.71 ▲1.88 |
Dashboard /wp-admin | 4.14 ▲0.84 | 50.10 ▲1.78 |
Posts /wp-admin/edit.php | 4.19 ▲0.84 | 47.45 ▲1.93 |
Add New Post /wp-admin/post-new.php | 6.68 ▲0.79 | 89.97 ▼14.00 |
Media Library /wp-admin/upload.php | 4.00 ▲0.77 | 39.60 ▲5.84 |
User Guide /wp-admin/admin.php?page=cmac_about | 4.17 | 402.08 |
Campaigns /wp-admin/admin.php?page=cmac_campaigns | 4.25 | 47.51 |
Settings /wp-admin/admin.php?page=cmac_settings | 4.41 | 1,022.21 |
Upgrade ➤ /wp-admin/admin.php?page=cmac_pro | 4.02 | 35.41 |
Server storage [IO: ▲1.29MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 146 new files
Database: 2 new tables, 7 new options
New tables |
---|
wp_cm_campaigns |
wp_cm_campaign_images |
New WordPress options |
---|
db_upgraded |
widget_acwidget |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for CM Ad Changer
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,843 ▲82 | 14.72 ▲0.46 | 1.59 ▼0.17 | 40.81 ▼3.73 |
Dashboard /wp-admin | 2,252 ▲71 | 5.82 ▲0.17 | 83.73 ▼16.52 | 76.94 ▲29.93 |
Posts /wp-admin/edit.php | 2,154 ▲54 | 2.28 ▲0.31 | 36.56 ▲1.10 | 34.46 ▲1.37 |
Add New Post /wp-admin/post-new.php | 1,574 ▲48 | 23.08 ▼0.13 | 665.92 ▲58.64 | 33.13 ▼22.21 |
Media Library /wp-admin/upload.php | 1,457 ▲57 | 4.43 ▲0.26 | 104.99 ▼4.03 | 78.03 ▲33.00 |
User Guide /wp-admin/admin.php?page=cmac_about | 3,912 | 19.24 | 489.31 | 211.51 |
Campaigns /wp-admin/admin.php?page=cmac_campaigns | 1,318 | 2.26 | 49.25 | 84.89 |
Settings /wp-admin/admin.php?page=cmac_settings | 2,340 | 7.53 | 79.84 | 65.47 |
Upgrade ➤ /wp-admin/admin.php?page=cmac_pro | 1,808 | 2.13 | 39.72 | 47.91 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 2 tables in the database
- wp_cm_campaign_images
- wp_cm_campaigns
- Zombie WordPress options were found after uninstall: 7 options
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_acwidget
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/cm-ad-changer/backend/views/admin_about.php
- > /wp-content/plugins/cm-ad-changer/backend/views/admin_pro.php
- 24× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/cm-ad-changer/backend/views/admin_campaigns.php:13
- > PHP Notice
Undefined variable: submenus in wp-content/plugins/cm-ad-changer/backend/views/admin_nav.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-ad-changer/package/cminds-plugin-config.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function ac_top_menu() in wp-content/plugins/cm-ad-changer/backend/views/admin_error.php:4
- > PHP Fatal error
Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/cm-ad-changer/backend/views/admin_nav.php:17
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cm-ad-changer/shared/classes/cmac-widget.php:9
- > PHP Notice
Trying to get property 'prefix' of non-object in wp-content/plugins/cm-ad-changer/shared/classes/cmac-data.php on line 35
- > PHP Warning
Use of undefined constant CMAC_IMAGES_TABLE - assumed 'CMAC_IMAGES_TABLE' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-ad-changer/shared/classes/cmac-data.php on line 35
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cm-ad-changer/package/views/plugin_compare_table.php:51
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-ad-changer/package/cminds-plugin-config.php:4
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=cmac_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
- > GET request to /wp-admin/admin.php?page=cmac_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
- > GET request to /wp-admin/admin.php?page=cmac_about
- > Deprecation (warning) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yQ/r/bnRvNSHX7Ev.js?_nc_x=Ij3Wp8lg5Kz 275 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
- > GET request to /wp-admin/admin.php?page=cmac_about
- > Console-api (severe) in unknown
https://static.xx.fbcdn.net/rsrc.php/v3/yQ/r/bnRvNSHX7Ev.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: ad server, ads, advertising network, campaign manager, banner
cm-ad-changer/cm-ad-changer.php Passed 13 tests
The principal PHP file in "CM Ad Changer" v. 1.9.6 is loaded by WordPress automatically on each request
71 characters long description:
Ad Changer. Manage, Track and Report Advertising Campaigns on your site
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin10,962 lines of code in 63 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 22 | 992 | 698 | 6,219 |
JavaScript | 35 | 161 | 396 | 2,734 |
CSS | 6 | 220 | 48 | 2,009 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 66.00 |
▷ Minimum class complexity | 10.00 |
▷ Maximum class complexity | 254.00 |
Average method complexity | 4.74 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 54.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 139 | |
▷ Static methods | 55 | 39.57% |
▷ Public methods | 123 | 88.49% |
▷ Protected methods | 8 | 5.76% |
▷ Private methods | 8 | 5.76% |
Functions | 12 | |
▷ Named functions | 12 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 52 | |
▷ Global constants | 48 | 92.31% |
▷ Class constants | 4 | 7.69% |
▷ Public constants | 4 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
69 PNG files occupy 0.60MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
package/views/tooltip.png | 16.77KB | 6.28KB | ▼ 62.54% |
package/views/WPmembership.png | 35.89KB | 11.14KB | ▼ 68.95% |
backend/assets/css/images/trash.png | 0.40KB | 0.40KB | 0.00% |
backend/assets/css/images/close.png | 0.95KB | 1.00KB | 0.00% |
package/views/videolessons.png | 17.52KB | 5.86KB | ▼ 66.55% |