Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
- Install procedure had errors
- > Deprecated in wp-content/plugins/simple-photos-contest/models/SPCModelDao.php+29
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
Server metrics [RAM: ▼1.92MB] [CPU: ▼58.52ms] Passed 4 tests
Analyzing server-side resources used by Simple Photos Contest
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.12 ▼1.38 | 5.04 ▼41.57 |
Dashboard /wp-admin | 2.14 ▼1.24 | 6.55 ▼56.66 |
Posts /wp-admin/edit.php | 2.14 ▼1.26 | 5.55 ▼47.48 |
Add New Post /wp-admin/post-new.php | 2.14 ▼3.79 | 7.06 ▼88.37 |
Media Library /wp-admin/upload.php | 2.14 ▼1.13 | 6.51 ▼29.40 |
Votes /wp-admin/admin.php?page=spc_votes | 2.14 | 6.96 |
Add photo /wp-admin/admin.php?page=spc_photo-edit | 2.14 | 6.88 |
Configuration /wp-admin/admin.php?page=spc_configuration | 2.14 | 6.42 |
Photos /wp-admin/admin.php?page=spc_photos | 2.14 | 7.38 |
Photos order /wp-admin/admin.php?page=spc_photos-order | 2.14 | 7.13 |
Overview /wp-admin/admin.php?page=spc_overview | 2.14 | 6.40 |
Server storage [IO: ▲0.81MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 121 new files
Database: 2 new tables, 6 new options
New tables |
---|
wp_spc_votes |
wp_spc_photos |
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Simple Photos Contest: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,868 ▲133 | 14.36 ▲0.01 | 1.82 ▼0.12 | 40.34 ▼0.21 |
Dashboard /wp-admin | 2,271 ▲94 | 5.53 ▼0.05 | 86.17 ▲2.12 | 40.73 ▲2.21 |
Posts /wp-admin/edit.php | 2,139 ▲39 | 1.99 ▲0.02 | 35.31 ▼2.76 | 39.65 ▲5.42 |
Add New Post /wp-admin/post-new.php | 1,557 ▲29 | 23.32 ▲0.22 | 683.46 ▲8.36 | 57.55 ▲6.43 |
Media Library /wp-admin/upload.php | 1,442 ▲42 | 4.19 ▼0.13 | 95.44 ▼14.57 | 44.65 ▼1.62 |
Votes /wp-admin/admin.php?page=spc_votes | 1,047 | 1.77 | 26.93 | 30.95 |
Add photo /wp-admin/admin.php?page=spc_photo-edit | 925 | 1.86 | 24.26 | 28.50 |
Configuration /wp-admin/admin.php?page=spc_configuration | 1,142 | 1.94 | 32.01 | 29.06 |
Photos /wp-admin/admin.php?page=spc_photos | 1,079 | 1.87 | 25.76 | 30.11 |
Photos order /wp-admin/admin.php?page=spc_photos-order | 855 | 1.84 | 27.79 | 29.32 |
Overview /wp-admin/admin.php?page=spc_overview | 854 | 1.87 | 26.86 | 30.47 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/simple-photos-contest/models/SPCModelDao.php+29
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
- The plugin did not uninstall successfully, leaving 2 tables in the database
- wp_spc_photos
- wp_spc_votes
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
- 6 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=spc_overview
- > Deprecated in wp-content/plugins/simple-photos-contest/models/SPCModelDao.php+29
Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=spc_photos-order
- > User deprecated in wp-includes/functions.php+5453
Function wpdb::escape is deprecated since version 3.6.0! Use wpdb::prepare() or esc_sql() instead.
SRP 0% 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
- 8× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/simple-photos-contest/auth/email/connect.php
- > /wp-content/plugins/simple-photos-contest/controlers/SimplePhotosContest.php
- > /wp-content/plugins/simple-photos-contest/auth/google/connect.php
- > /wp-content/plugins/simple-photos-contest/controlers/SimplePhotosContestFront.php
- > /wp-content/plugins/simple-photos-contest/spc-wp-front-ajax.php
- > /wp-content/plugins/simple-photos-contest/simple-photos-contest.php
- > /wp-content/plugins/simple-photos-contest/controlers/SimplePhotosContestAdmin.php
- > /wp-content/plugins/simple-photos-contest/auth/openid/connect.php
- 18× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-photos-contest/templates/admin-photo-edit-page.php:12
- > PHP Fatal error
Uncaught Error: Class 'SimplePhotosContest' not found in wp-content/plugins/simple-photos-contest/templates/front-gallery-shortcode.php:17
- > PHP Fatal error
Uncaught Error: Class 'SPCModelDao' not found in wp-content/plugins/simple-photos-contest/models/SPCPhotosDao.php:7
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/simple-photos-contest/models/SPCListTable.php on line 8
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-photos-contest/models/SPCListTable.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/simple-photos-contest/templates/admin-overview-page.php:11
- > PHP Fatal error
Uncaught Error: Class 'SimplePhotosContest' not found in wp-content/plugins/simple-photos-contest/templates/front-vote-popup.php:57
- > PHP Fatal error
Uncaught Error: Class 'SimplePhotosContestAdmin' not found in wp-content/plugins/simple-photos-contest/templates/admin-configuration-page.php:22
- > PHP Fatal error
Uncaught Error: Class 'SPCQueryOptions' not found in wp-content/plugins/simple-photos-contest/templates/admin-photos-order.php:8
- > PHP Warning
require_once(wp-content/plugins/simple-photos-contest/models/../libs/PHPExcel_1.7.8/PHPExcel.php): failed to open stream: No such file or directory in wp-content/plugins/simple-photos-contest/models/SPCExport.php on line 6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: photos, contest
simple-photos-contest/simple-photos-contest.php Passed 13 tests
The main PHP file in "Simple Photos Contest" ver. 0.5 adds more information about the plugin and also serves as the entry point for this plugin
44 characters long description:
A simple photos contest plugin for WordPress
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin8,466 lines of code in 49 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 25 | 862 | 739 | 3,451 |
JavaScript | 11 | 335 | 241 | 2,983 |
CSS | 10 | 198 | 239 | 1,692 |
PO File | 1 | 98 | 111 | 213 |
HTML | 2 | 24 | 8 | 127 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 29.92 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 161.00 |
Average method complexity | 4.08 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 13 | |
▷ Abstract classes | 2 | 15.38% |
▷ Concrete classes | 11 | 84.62% |
▷ Final classes | 0 | 0.00% |
Methods | 123 | |
▷ Static methods | 8 | 6.50% |
▷ Public methods | 106 | 86.18% |
▷ Protected methods | 17 | 13.82% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 32 | |
▷ Global constants | 5 | 15.62% |
▷ Class constants | 27 | 84.38% |
▷ Public constants | 27 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
58 PNG files occupy 0.29MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
js/fancybox-1.3.4/fancybox-x.png | 0.20KB | 0.31KB | 0.00% |
js/fancybox-1.3.4/fancybox.png | 14.93KB | 8.47KB | ▼ 43.29% |
css/pg-gallery/pg_next.png | 0.35KB | 0.26KB | ▼ 25.35% |
css/pg-gallery/pg_scroll_forward.png | 0.23KB | 0.16KB | ▼ 28.63% |
images/favoris-votez-hover.png | 9.83KB | 4.33KB | ▼ 55.98% |