60% totalcontest-lite

Code Review | Photo Contest | Competition | Video Contest

WordPress plugin Photo Contest | Competition | Video Contest scored60%from 54 tests.

About plugin

  • Plugin page: totalcontest-lite
  • Plugin version: 2.7.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2019
  • Latest release: Oct 4, 2023
  • Number of updates: 53
  • Update frequency: every 26.4 days
  • Top authors: totalsuite (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active /6,161 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.62MB] [CPU: ▲7.71ms] Passed 4 tests

Server-side resources used by Photo Contest | Competition | Video Contest
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6344.20 ▲5.68
Dashboard /wp-admin3.95 ▲0.6551.10 ▲4.81
Posts /wp-admin/edit.php4.03 ▲0.6857.80 ▲13.51
Add New Post /wp-admin/post-new.php6.50 ▲0.6191.46 ▲7.28
Media Library /wp-admin/upload.php3.81 ▲0.5843.83 ▲13.06
Logs /wp-admin/edit.php?post_type=contest&page=log3.8543.47
Create Contest /wp-admin/post-new.php?post_type=contest4.4678.82
Contests /wp-admin/edit.php?post_type=contest4.0046.02
Extensions /wp-admin/edit.php?post_type=contest&page=extensions3.8240.95
Dashboard /wp-admin/edit.php?post_type=contest&page=dashboard3.4023.62
Options /wp-admin/edit.php?post_type=contest&page=options3.7540.17
Submissions /wp-admin/edit.php?post_type=contest_submission4.0057.06
Scheduled Actions /wp-admin/tools.php?page=action-scheduler3.9948.93
Upgrade to Pro /wp-admin/edit.php?post_type=contest&page=upgrade-to-pro3.8243.48
Onboarding /wp-admin/edit.php?post_type=contest&page=onboarding3.88157.06

Server storage [IO: ▲4.24MB] [DB: ▲0.03MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
These are issues you should consider
  • You have illegally modified 2 files (0.00KB) outside of "wp-content/plugins/totalcontest-lite/" and "wp-content/uploads/"
    • (new file) wp-content/exports/totalcontest/index.html
    • (new file) wp-content/cache/totalcontest/css/.empty
Filesystem: 697 new files
Database: 6 new tables, 15 new options
New tables
wp_actionscheduler_logs
wp_actionscheduler_claims
wp_totalcontest_votes
wp_actionscheduler_groups
wp_totalcontest_log
wp_actionscheduler_actions
New WordPress options
widget_recent-comments
widget_recent-posts
widget_totalcontest_countdown
totalcontest_tracking
totalcontest_db_version
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_totalcontest_submission
...

Browser metrics 75% from 4 tests

An overview of browser requirements for Photo Contest | Competition | Video Contest
Please improve the following
  • Nodes: You must limit the number of DOM nodes under 25,000 (currently 26,315 on /wp-admin/post-new.php?post_type=contest)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12013.34 ▼1.044.50 ▲2.7143.46 ▼3.26
Dashboard /wp-admin2,266 ▲755.83 ▲0.92114.22 ▼2.1843.07 ▼0.01
Posts /wp-admin/edit.php2,152 ▲631.98 ▼0.0740.43 ▲3.3937.34 ▲4.25
Add New Post /wp-admin/post-new.php1,596 ▲8223.43 ▲5.93616.65 ▼61.1759.68 ▼1.56
Media Library /wp-admin/upload.php1,454 ▲664.18 ▼0.1196.87 ▼3.8843.78 ▼2.95
Logs /wp-admin/edit.php?post_type=contest&page=log2,3626.43151.6430.19
Create Contest /wp-admin/post-new.php?post_type=contest26,31520.391,136.7460.94
Contests /wp-admin/edit.php?post_type=contest1,1311.9430.3426.71
Extensions /wp-admin/edit.php?post_type=contest&page=extensions1,0904.4787.3526.57
Dashboard /wp-admin/edit.php?post_type=contest&page=dashboard1,4575.0278.5380.08
Options /wp-admin/edit.php?post_type=contest&page=options4,3175.88134.0432.30
Submissions /wp-admin/edit.php?post_type=contest_submission1,7754.3569.7326.05
Scheduled Actions /wp-admin/tools.php?page=action-scheduler1,2601.8428.0828.62
Upgrade to Pro /wp-admin/edit.php?post_type=contest&page=upgrade-to-pro1,1962.1424.2330.96
Onboarding /wp-admin/edit.php?post_type=contest&page=onboarding1,4085.0171.8362.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 50% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 6 tables
    • wp_actionscheduler_actions
    • wp_actionscheduler_groups
    • wp_totalcontest_votes
    • wp_actionscheduler_claims
    • wp_actionscheduler_logs
    • wp_totalcontest_log
  • The uninstall procedure has failed, leaving 15 options in the database
    • widget_totalcontest_countdown
    • widget_totalcontest_contest
    • widget_recent-posts
    • action_scheduler_hybrid_store_demarkation
    • can_compress_scripts
    • widget_totalcontest_submission
    • schema-ActionScheduler_StoreSchema
    • schema-ActionScheduler_LoggerSchema
    • widget_theysaidso_widget
    • totalcontest_first_usage
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=contest&page=options
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
    • > GET request to /wp-admin/edit.php?post_type=contest_submission
    • > Warning in wp-content/plugins/totalcontest-lite/src/Admin/Submission/Listing.php+242
    include(wp-content/plugins/totalcontest-lite/src/Admin/Submission/Views/templates.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/edit.php?post_type=contest_submission
    • > Warning in wp-content/plugins/totalcontest-lite/src/Admin/Submission/Listing.php+242
    include(): Failed opening 'wp-content/plugins/totalcontest-lite/src/Admin/Submission/Views/templates.php' for inclusion (include_path='.:/usr/share/php')

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
  • 28× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Submission/Views/tabs/contents.php
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Options/views/tabs/migration.php
    • > /wp-content/plugins/totalcontest-lite/modules/templates/Basic/views/shared/footer.php
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Contest/views/integration/index.php
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Plugins/views/uninstall-feedback.php
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Contest/views/form/fields/category.php
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Submission/views/tabs/fields.php
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Contest/views/form/fields/richtext.php
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Contest/views/form/fields/textarea.php
    • > /wp-content/plugins/totalcontest-lite/src/Admin/Privacy/views/privacy-policy.php
  • 365× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TotalContest\\Shortcode\\Base' not found in wp-content/plugins/totalcontest-lite/src/Shortcode/Audio.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'TotalContestVendors\\TotalCore\\Form\\Form' not found in wp-content/plugins/totalcontest-lite/src/Form/VoteForm.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'TotalContestVendors\\Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/totalcontest-lite/vendor/container-interop/container-interop/src/Interop/Container/Exception/ContainerException.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/totalcontest-lite/src/Admin/Contest/views/settings/content/index.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'TotalContest\\Form\\Fields\\MediaField' not found in wp-content/plugins/totalcontest-lite/src/Form/Fields/AudioField.php:11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/totalcontest-lite/src/Admin/Submission/views/tabs/preview.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'TotalContestVendors\\TotalCore\\Modules\\Repository' not found in wp-content/plugins/totalcontest-lite/src/Modules/Repository.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'TotalContestVendors\\TotalCore\\Form\\Field' not found in wp-content/plugins/totalcontest-lite/vendor/misqtech/totalsuite-totalcore/src/Form/Fields/NumberField.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/totalcontest-lite/src/Admin/Contest/views/integration/widget.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'TotalContest\\Contracts\\Migrations\\Contest\\Template\\Template' not found in wp-content/plugins/totalcontest-lite/src/Contracts/Migrations/Contest/Template/Submission.php:9

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 80% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (58 tag instead of maximum 10)
The official readme.txt is a good inspiration

totalcontest-lite/plugin.php 62% from 13 tests

The primary PHP file in "Photo Contest | Competition | Video Contest" version 2.7.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.8.0" instead of "4.8")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("totalcontest-lite.php" instead of "plugin.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
No dangerous file extensions were detected60,586 lines of code in 537 files:
LanguageFilesBlank linesComment linesLines of code
PHP4696,58717,68531,674
CSS131,4374011,973
JavaScript181041,8559,726
PO File43,2915,1766,741
SVG2906413
SQL20031
JSON10022
XML1006

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.40
▷ Minimum class complexity1.00
▷ Maximum class complexity140.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces96
Interfaces72
Traits5
Classes264
▷ Abstract classes4316.29%
▷ Concrete classes22183.71%
▷ Final classes10.45%
Methods2,297
▷ Static methods2008.71%
▷ Public methods2,08190.60%
▷ Protected methods1707.40%
▷ Private methods462.00%
Functions234
▷ Named functions5623.93%
▷ Anonymous functions17876.07%
Constants71
▷ Global constants1014.08%
▷ Class constants6185.92%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dist/images/migration/totalcontest-1.png8.12KB3.95KB▼ 51.37%
assets/dist/images/no-preview.png3.98KB3.67KB▼ 7.83%