Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.31MB] [CPU: ▲1.93ms] 75% from 4 tests
A check of server-side resources used by CM Answers
The following require your attention
- CPU: Total CPU usage should be kept under 500.00ms (currently 931.01ms on /wp-admin/admin.php?page=CMA_admin_settings)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.78 ▲0.32 | 45.40 ▲9.38 |
Dashboard /wp-admin | 3.61 ▲0.31 | 53.13 ▲3.78 |
Posts /wp-admin/edit.php | 3.66 ▲0.30 | 49.44 ▲4.71 |
Add New Post /wp-admin/post-new.php | 6.24 ▲0.35 | 86.37 ▼4.99 |
Media Library /wp-admin/upload.php | 3.52 ▲0.30 | 39.33 ▲4.20 |
Answers /wp-admin/edit-comments.php?post_type=cma_thread | 3.54 | 40.88 |
User Guide /wp-admin/admin.php?page=cma_about | 3.66 | 413.99 |
Settings /wp-admin/admin.php?page=CMA_admin_settings | 3.75 | 931.01 |
Upgrade ➤ /wp-admin/admin.php?page=cma_pro | 3.58 | 30.85 |
Questions /wp-admin/edit.php?post_type=cma_thread | 3.64 | 42.96 |
Server storage [IO: ▲1.31MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
This plugin installed successfully
Filesystem: 95 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
widget_recent-posts |
cma_afterActivation |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for CM Answers
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,051 ▲290 | 14.28 ▼0.37 | 1.72 ▲0.13 | 44.17 ▲7.64 |
Dashboard /wp-admin | 2,411 ▲230 | 5.55 ▼0.13 | 82.97 ▼29.44 | 41.36 ▼8.05 |
Posts /wp-admin/edit.php | 2,142 ▲42 | 2.02 ▼0.01 | 33.37 ▼10.76 | 38.70 ▼1.65 |
Add New Post /wp-admin/post-new.php | 1,563 ▲37 | 23.48 ▲0.29 | 665.92 ▼7.75 | 55.54 ▼9.96 |
Media Library /wp-admin/upload.php | 1,445 ▲42 | 4.21 ▲0.02 | 96.62 ▼2.05 | 47.42 ▲5.86 |
Answers /wp-admin/edit-comments.php?post_type=cma_thread | 2,064 | 2.27 | 37.00 | 36.18 |
User Guide /wp-admin/admin.php?page=cma_about | 3,127 | 12.73 | 248.03 | 188.32 |
Settings /wp-admin/admin.php?page=CMA_admin_settings | 2,793 | 7.91 | 64.19 | 60.48 |
Upgrade ➤ /wp-admin/admin.php?page=cma_pro | 2,370 | 2.31 | 43.22 | 51.50 |
Questions /wp-admin/edit.php?post_type=cma_thread | 2,129 | 1.98 | 33.48 | 33.25 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
- This plugin does not fully uninstall, leaving 7 options in the database
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- cma_afterActivation
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test
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 take a closer look at the following
- 15× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cm-answers/package/views/registration.php:42
- > PHP Fatal error
Uncaught Error: Class 'CMA_BaseController' not found in wp-content/plugins/cm-answers/lib/controllers/AnswerController.php:3
- > PHP Warning
Use of undefined constant CMA_PATH - assumed 'CMA_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cm-answers/lib/controllers/AnswerController.php on line 2
- > PHP Warning
include_once(CMA_PATH/lib/models/PostType.php): failed to open stream: No such file or directory in wp-content/plugins/cm-answers/lib/models/AnswerThread.php on line 2
- > PHP Warning
include_once(CMA_PATH/lib/models/AnswerThread.php): failed to open stream: No such file or directory in wp-content/plugins/cm-answers/lib/controllers/AnswerController.php on line 2
- > PHP Warning
include_once(): Failed opening 'CMA_PATH/lib/models/AnswerThread.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cm-answers/lib/controllers/AnswerController.php on line 2
- > PHP Warning
include_once(): Failed opening 'CMA_PATH/lib/models/PostType.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cm-answers/lib/models/AnswerThread.php on line 2
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/cm-answers/package/views/userguide_free.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/cm-answers/package/views/plugin_compare_table.php:51
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cm-answers/package/cminds-plugin-config.php:4
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
- > GET request to /wp-admin/admin.php?page=cma_about
- > Network (severe)
wp-content/plugins/cm-answers/package/css/rolling@2x.gif - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=cma_about
- > Network (severe)
wp-content/plugins/cm-answers/package/js/mailerlite.js?ver=3.2.2 - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=cma_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
- > GET request to /wp-admin/admin.php?page=cma_about
- > Security (warning) in unknown
security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
- > GET request to /wp-admin/admin.php?page=CMA_admin_settings
- > Network (severe)
wp-content/plugins/cm-answers/package/js/froogaloop.js - Failed to load resource: the server responded with a status of 404 (Not Found)
- > GET request to /wp-admin/admin.php?page=CMA_admin_settings
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $f is not defined" "ReferenceError: $f is not defined\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=CMA_admin_settings:1418:51)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/admin.php?page=CMA_admin_settings
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: $f is not defined
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: forum plugin, q and a plugin, questions and answers, question
cm-answers/cm-answers.php 92% from 13 tests
The entry point to "CM Answers" version 3.2.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
- Description: Please don't use more than 140 characters for the plugin description (currently 152 characters long)
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 plugin12,110 lines of code in 50 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 34 | 1,784 | 596 | 8,206 |
PO File | 9 | 1,107 | 2,345 | 2,904 |
CSS | 5 | 131 | 17 | 896 |
JavaScript | 2 | 18 | 57 | 104 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 45.77 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 254.00 |
Average method complexity | 2.80 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 38.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 2 | 15.38% |
▷ Concrete classes | 11 | 84.62% |
▷ Final classes | 0 | 0.00% |
Methods | 318 | |
▷ Static methods | 162 | 50.94% |
▷ Public methods | 274 | 86.16% |
▷ Protected methods | 40 | 12.58% |
▷ Private methods | 4 | 1.26% |
Functions | 6 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 6 | 100.00% |
Constants | 56 | |
▷ Global constants | 5 | 8.93% |
▷ Class constants | 51 | 91.07% |
▷ Public constants | 51 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
30 PNG files occupy 0.52MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
package/views/banner_yearly-membership_220px.png | 31.34KB | 10.91KB | ▼ 65.19% |
package/views/img/circle.png | 10.91KB | 4.69KB | ▼ 57.01% |
package/views/99suite.png | 14.06KB | 5.58KB | ▼ 60.33% |
package/views/img/assets.png | 16.34KB | 6.92KB | ▼ 57.67% |
views/resources/imgs/success.png | 4.34KB | 1.51KB | ▼ 65.32% |