10% volleytnt

Code Review | VolleyTNT

WordPress plugin VolleyTNT scored10%from 54 tests.

About plugin

  • Plugin page: volleytnt
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.1
  • WordPress version: 6.3.1
  • First release: Dec 7, 2011
  • Latest release: Oct 22, 2012
  • Number of updates: 30
  • Update frequency: every 10.7 days
  • Top authors: belinde (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,778 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Parse error in wp-content/plugins/volleytnt/core/form.php+41
    syntax error, unexpected '&', expecting ')'

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.24ms] Passed 4 tests

Server-side resources used by VolleyTNT
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.87 ▼5.55
Dashboard /wp-admin3.31 ▲0.0047.03 ▼5.11
Posts /wp-admin/edit.php3.36 ▲0.0044.82 ▼2.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.07 ▼4.16
Media Library /wp-admin/upload.php3.23 ▲0.0036.66 ▲0.34

Server storage [IO: ▲0.55MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 61 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by VolleyTNT
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.33 ▼0.251.53 ▼0.5238.40 ▼10.14
Dashboard /wp-admin2,195 ▲185.50 ▼0.0482.08 ▼7.4039.04 ▲3.73
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0035.47 ▼0.3537.32 ▲1.60
Add New Post /wp-admin/post-new.php1,526 ▼523.05 ▲0.21629.85 ▲22.2451.78 ▼3.25
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.00100.81 ▲2.3642.15 ▲2.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'VolleyTNT_AdminPage' not found in wp-content/plugins/volleytnt/admin/volleytnt_home.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'VolleyTNT_AdminPage' not found in wp-content/plugins/volleytnt/admin/volleytnt_risultati.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/volleytnt/volleytnt.php on line 12
    • > PHP Parse error
      syntax error, unexpected '&', expecting ')' in wp-content/plugins/volleytnt/core/form.php on line 41
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/volleytnt/volleytnt.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'VolleyTNT_AdminPage' not found in wp-content/plugins/volleytnt/admin/volleytnt_partite.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'VolleyTNT_AdminPage' not found in wp-content/plugins/volleytnt/admin/volleytnt_opzioni.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'VolleyTNT_AdminPage' not found in wp-content/plugins/volleytnt/admin/volleytnt_squadre.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/volleytnt/volleytnt.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'VolleyTNT_AdminPage' not found in wp-content/plugins/volleytnt/admin/volleytnt_gironi.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (The plugin dashboard and his widgets), #2 (The teams management for current tournement), #3 (The first phase management), #4 (The calendar creation), #5 (The results management), #6 (The final knock-out management)
The official readme.txt is a good inspiration

volleytnt/volleytnt.php Passed 13 tests

The main PHP script in "VolleyTNT" version 0.1 is automatically included on every request by WordPress
46 characters long description:
Gestione di tornei di Beach Volley e Pallavolo

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 plugin3,652 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP13336112,605
CSS3179152806
JavaScript8273241

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity41.25
▷ Minimum class complexity3.00
▷ Maximum class complexity130.00
Average method complexity4.99
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods121
▷ Static methods32.48%
▷ Public methods8771.90%
▷ Protected methods119.09%
▷ Private methods2319.01%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
28 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
style/jqueryui_gray/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
style/jqueryui_gray/images/ui-bg_gloss-wave_35_f6a828_500x100.png3.67KB1.93KB▼ 47.53%
style/jqueryui_gray/images/ui-bg_flat_10_000000_40x100.png0.17KB0.08KB▼ 51.12%
style/jqueryui_gray/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
style/jqueryui_gray/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%