Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.04MB] [CPU: ▼4.60ms] Passed 4 tests
An overview of server-side resources used by WP Contest
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 41.84 ▲1.65 |
Dashboard /wp-admin | 3.35 ▲0.04 | 47.83 ▼0.36 |
Posts /wp-admin/edit.php | 3.46 ▲0.10 | 47.16 ▼0.60 |
Add New Post /wp-admin/post-new.php | 5.93 ▲0.04 | 80.33 ▼18.90 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 35.15 ▲1.47 |
Entries /wp-admin/admin.php?page=wpc_entries | 3.30 | 29.90 |
General Settings /wp-admin/admin.php?page=wpc_general_settings | 3.29 | 40.00 |
Add Contest /wp-admin/admin.php?page=wpc_setting | 3.26 | 36.27 |
Contests /wp-admin/admin.php?page=wpc_contests | 3.36 | 31.26 |
Voting /wp-admin/admin.php?page=wpc_phase_two | 3.27 | 30.54 |
Shortcodes /wp-admin/admin.php?page=wpc_shortcodes | 3.26 | 29.63 |
View Editing Reason /wp-admin/admin.php?page=editing_reason | 3.28 | 33.04 |
Server storage [IO: ▲0.97MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 154 new files
Database: 4 new tables, 7 new options
New tables |
---|
wp_wpc_phase_two_votiong |
wp_wpc_contests |
wp_wpc_phase_one_votiong |
wp_wpc_entry |
New WordPress options |
---|
theysaidso_admin_options |
widget_theysaidso_widget |
wpc_general_settings |
widget_recent-posts |
db_upgraded |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by WP Contest
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,043 ▲286 | 13.63 ▼0.74 | 12.60 ▲10.58 | 38.40 ▼11.37 |
Dashboard /wp-admin | 2,246 ▲58 | 5.83 ▲0.92 | 96.86 ▼5.08 | 37.50 ▼9.08 |
Posts /wp-admin/edit.php | 2,132 ▲43 | 2.05 ▲0.04 | 39.41 ▼2.08 | 35.03 ▼2.95 |
Add New Post /wp-admin/post-new.php | 1,571 ▲29 | 23.13 ▲4.80 | 681.00 ▲72.35 | 52.07 ▲2.87 |
Media Library /wp-admin/upload.php | 1,431 ▲40 | 4.30 ▲0.08 | 95.18 ▼3.28 | 41.43 ▼3.38 |
Entries /wp-admin/admin.php?page=wpc_entries | 842 | 1.81 | 26.50 | 42.34 |
General Settings /wp-admin/admin.php?page=wpc_general_settings | 1,136 | 1.96 | 35.56 | 42.99 |
Add Contest /wp-admin/admin.php?page=wpc_setting | 872 | 2.02 | 32.55 | 27.14 |
Contests /wp-admin/admin.php?page=wpc_contests | 839 | 2.17 | 34.56 | 22.74 |
Voting /wp-admin/admin.php?page=wpc_phase_two | 820 | 1.72 | 24.44 | 26.36 |
Shortcodes /wp-admin/admin.php?page=wpc_shortcodes | 938 | 2.32 | 23.71 | 46.10 |
View Editing Reason /wp-admin/admin.php?page=editing_reason | 804 | 1.71 | 25.36 | 26.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- The uninstall procedure failed, leaving 4 tables in the database
- wp_wpc_phase_one_votiong
- wp_wpc_contests
- wp_wpc_phase_two_votiong
- wp_wpc_entry
- The uninstall procedure has failed, leaving 7 options in the database
- can_compress_scripts
- wpc_general_settings
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
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)
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
- 19× PHP files output text when accessed directly (only 10 are shown):
- > /wp-content/plugins/wp-contest/pdf/font/courier.php
- > /wp-content/plugins/wp-contest/pdf/font/courierb.php
- > /wp-content/plugins/wp-contest/pdf/font/timesb.php
- > /wp-content/plugins/wp-contest/pdf/makefont/makefont.php
- > /wp-content/plugins/wp-contest/pdf/font/zapfdingbats.php
- > /wp-content/plugins/wp-contest/pdf/font/timesi.php
- > /wp-content/plugins/wp-contest/pdf/font/courieri.php
- > /wp-content/plugins/wp-contest/pdf/font/timesbi.php
- > /wp-content/plugins/wp-contest/pdf/font/times.php
- > /wp-content/plugins/wp-contest/pdf/font/helvetica.php
- 9× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-contest/inc/admin_pages/add_contest.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function wpc_get_all_contest_id() in wp-content/plugins/wp-contest/inc/admin_pages/phase_two.php:15
- > PHP Fatal error
require(): Failed opening required 'WPC_PATH/pdf/fpdf.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-contest/inc/pdf_download.php on line 8
- > PHP Warning
Use of undefined constant WPC_PATH - assumed 'WPC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-contest/inc/pdf_download.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-contest/inc/admin_pages/editing_reason.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function wpc_get_judges() in wp-content/plugins/wp-contest/inc/admin_pages/contests.php:23
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-contest/inc/admin_pages/general_settings.php:8
- > PHP Warning
require(WPC_PATH/pdf/fpdf.php): failed to open stream: No such file or directory in wp-content/plugins/wp-contest/inc/pdf_download.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function wpc_get_all_contest_id() in wp-content/plugins/wp-contest/inc/admin_pages/entries.php:155
- > 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)
There are user-side issues you should fix
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=editing_reason
- > 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: $(...).tooltip is not a function" "TypeError: $(...).tooltip is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-contest/js/pop_admin_js.js?ver=6.3.1:345:32)\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
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=editing_reason
- > 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 TypeError: $(...).tooltip is not a function
Optimizations
Plugin configuration 90% from 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
5 plugin tags: voting, vote, judging, photo contest, contest
wp-contest/wpc_contest.php 77% from 13 tests
The main PHP file in "WP Contest" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Domain Path: The domain path folder was not found ("/lang")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: The principal plugin file should be the same as the plugin slug ("wp-contest.php" instead of "wpc_contest.php")
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
Everything looks great! No dangerous files found in this plugin14,296 lines of code in 125 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 8 | 1,148 | 23 | 6,695 |
PHP | 58 | 423 | 352 | 4,023 |
HTML | 49 | 4 | 0 | 1,971 |
JavaScript | 9 | 567 | 355 | 1,378 |
SVG | 1 | 0 | 0 | 229 |
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.39 |
Average class complexity | 44.38 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 338.00 |
Average method complexity | 4.69 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 46.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 13 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 153 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 114 | 74.51% |
▷ Protected methods | 38 | 24.84% |
▷ Private methods | 1 | 0.65% |
Functions | 100 | |
▷ Named functions | 100 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/close.png | 0.27KB | 0.29KB | 0.00% |
images/next.png | 1.32KB | 1.58KB | 0.00% |
images/prev.png | 1.33KB | 1.59KB | 0.00% |
images/camera.png | 1.43KB | 0.51KB | ▼ 64.32% |