84% results-for-handball4all

Code Review | Results for Handball4All

WordPress plugin Results for Handball4All scored84%from 54 tests.

About plugin

  • Plugin page: results-for-handb...
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Mar 21, 2022
  • Latest release: Nov 26, 2023
  • Number of updates: 5
  • Update frequency: every 84.4 days
  • Top authors: yannickzipf (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,416 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼6.67ms] Passed 4 tests

This is a short check of server-side resources used by Results for Handball4All
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3640.84 ▲0.23
Dashboard /wp-admin3.67 ▲0.3352.16 ▼10.02
Posts /wp-admin/edit.php3.73 ▲0.3751.33 ▲6.08
Add New Post /wp-admin/post-new.php6.21 ▲0.3283.92 ▼16.92
Media Library /wp-admin/upload.php3.53 ▲0.3136.09 ▲0.05
RH4A Options /wp-admin/admin.php?page=rh4a3.5031.76
RH4A Timetables /wp-admin/admin.php?page=rh4a-timetable3.5034.59
RH4A Standings /wp-admin/admin.php?page=rh4a-standing3.5031.93
RH4A Next Match /wp-admin/admin.php?page=rh4a-next-match3.5033.51

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 29 new files
Database: 3 new tables, 8 new options
New tables
wp_rh4a_next_match
wp_rh4a_standing
wp_rh4a_timetable
New WordPress options
can_compress_scripts
rh4a_version
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
rh4a_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Results for Handball4All
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8714.24 ▼0.121.58 ▼0.1135.76 ▼6.88
Dashboard /wp-admin2,237 ▲575.65 ▲0.01101.21 ▲10.9642.52 ▼0.09
Posts /wp-admin/edit.php2,142 ▲422.02 ▼0.0141.22 ▼0.6135.36 ▼1.32
Add New Post /wp-admin/post-new.php1,561 ▲3523.10 ▲0.03652.96 ▲14.9650.77 ▼1.07
Media Library /wp-admin/upload.php1,445 ▲514.24 ▲0.0599.76 ▲2.2144.29 ▲1.83
RH4A Options /wp-admin/admin.php?page=rh4a8532.0525.5426.47
RH4A Timetables /wp-admin/admin.php?page=rh4a-timetable8362.0526.2028.03
RH4A Standings /wp-admin/admin.php?page=rh4a-standing8302.0224.6924.62
RH4A Next Match /wp-admin/admin.php?page=rh4a-next-match8272.0225.1226.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • 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)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'RH4A_Render_Abstract' not found in wp-content/plugins/results-for-handball4all/public/class-rh4a-render-next-match.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RH4A_Render_Abstract' not found in wp-content/plugins/results-for-handball4all/public/class-rh4a-render-standing.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RH4A_Shortcode_Abstract' not found in wp-content/plugins/results-for-handball4all/admin/class-rh4a-admin-standing.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RH4A_Render_Abstract' not found in wp-content/plugins/results-for-handball4all/public/class-rh4a-render-timetable.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RH4A_Shortcode_Abstract' not found in wp-content/plugins/results-for-handball4all/admin/class-rh4a-admin-timetable.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RH4A_Shortcode_Abstract' not found in wp-content/plugins/results-for-handball4all/admin/class-rh4a-admin-next-match.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: sports, results, standing, h4a, timetable...

results-for-handball4all/results-h4a.php 92% from 13 tests

The main file in "Results for Handball4All" v. 1.3.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("results-for-handball4all.php" instead of "results-h4a.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,739 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP202304941,406
PO File175118197
CSS25074
JavaScript12662

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity14.56
▷ Minimum class complexity2.00
▷ Maximum class complexity53.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes212.50%
▷ Concrete classes1487.50%
▷ Final classes00.00%
Methods111
▷ Static methods43.60%
▷ Public methods7365.77%
▷ Protected methods2320.72%
▷ Private methods1513.51%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants466.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected