78% soccerpress

Code Review | SoccerPress

WordPress plugin SoccerPress scored78%from 54 tests.

About plugin

  • Plugin page: soccerpress
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 2, 2019
  • Latest release: Aug 4, 2020
  • Number of updates: 8
  • Update frequency: every 38.4 days
  • Top authors: bogi1991 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /641 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.09ms] Passed 4 tests

This is a short check of server-side resources used by SoccerPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.82 ▼0.30
Dashboard /wp-admin3.36 ▲0.0146.02 ▼13.90
Posts /wp-admin/edit.php3.47 ▲0.1245.51 ▼2.62
Add New Post /wp-admin/post-new.php5.96 ▲0.0898.31 ▲8.92
Media Library /wp-admin/upload.php3.28 ▲0.0542.15 ▲8.47
Erstellen /wp-admin/post-new.php?post_type=teams3.3240.25
Fupa Teams /wp-admin/edit.php?post_type=teams3.3234.00

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for SoccerPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,029 ▲28313.92 ▼0.2910.66 ▲8.9932.30 ▼7.74
Dashboard /wp-admin2,237 ▲495.18 ▲0.15110.48 ▼4.0451.15 ▲10.74
Posts /wp-admin/edit.php2,120 ▲282.29 ▲0.2537.86 ▼5.5639.20 ▲1.17
Add New Post /wp-admin/post-new.php1,704 ▲17125.06 ▲1.77592.87 ▼19.7264.86 ▲0.44
Media Library /wp-admin/upload.php1,419 ▲374.31 ▲0.1096.72 ▼6.1445.95 ▲2.96
Erstellen /wp-admin/post-new.php?post_type=teams1,4802.7752.1464.13
Fupa Teams /wp-admin/edit.php?post_type=teams1,1062.2232.1733.95

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/soccerpress/includes/admin/html-admin.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/soccerpress/includes/shortcodes.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_post_type() in wp-content/plugins/soccerpress/includes/post-types/teams.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in soccerpress/assets to your readme.txt
The official readme.txt is a good inspiration

soccerpress/soccerpress.php Passed 13 tests

The main PHP script in "SoccerPress" version 1.0.2 is automatically included on every request by WordPress
90 characters long description:
Mit diesem Plugin können Sie Live Tabellen von FuPa einfach auf Ihrer Webseite einbinden.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected9,445 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS22,012159,165
PHP54886279
JavaScript1061

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin