84% statsfc-prediction-league

Code Review | StatsFC Prediction League

WordPress plugin StatsFC Prediction League scored84%from 54 tests.

About plugin

  • Plugin page: statsfc-predictio...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 19, 2014
  • Latest release: Jun 22, 2023
  • Number of updates: 32
  • Update frequency: every 100.9 days
  • Top authors: willjw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,820 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.48ms] Passed 4 tests

Analyzing server-side resources used by StatsFC Prediction League
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.61 ▼4.12
Dashboard /wp-admin3.31 ▲0.0147.04 ▼5.62
Posts /wp-admin/edit.php3.37 ▲0.0148.63 ▲2.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.01 ▼6.96
Media Library /wp-admin/upload.php3.24 ▲0.0136.64 ▲4.06

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_statsfc_predictionleague
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for StatsFC Prediction League
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.23 ▼1.141.86 ▼0.0741.38 ▼4.89
Dashboard /wp-admin2,209 ▲245.91 ▲1.0195.36 ▼19.9539.63 ▼4.32
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0640.62 ▲4.1835.43 ▲1.05
Add New Post /wp-admin/post-new.php1,514 ▼1417.66 ▼0.45659.68 ▲15.6565.67 ▼4.06
Media Library /wp-admin/upload.php1,391 ▼04.22 ▼0.04101.17 ▼0.9142.65 ▼3.10

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_statsfc_predictionleague
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/statsfc-prediction-league/statsfc-prediction-league.php:35

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

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

statsfc-prediction-league/statsfc-prediction-league.php Passed 13 tests

The primary PHP file in "StatsFC Prediction League" version 2.0.1 is used by WordPress to initiate all plugin functionality
25 characters long description:
StatsFC Prediction League

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected124 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13253122
JavaScript1272

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
There were not PNG files found in your plugin