83% league-table-lite

Code Review | League Table

WordPress plugin League Table scored83%from 54 tests.

About plugin

  • Plugin page: league-table-lite
  • Plugin version: 1.13
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: May 14, 2021
  • Latest release: Apr 5, 2023
  • Number of updates: 5
  • Update frequency: every 138.4 days
  • Top authors: daext (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /5,040 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.30MB] [CPU: ▼9.44ms] Passed 4 tests

A check of server-side resources used by League Table
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1537.14 ▼2.48
Dashboard /wp-admin3.71 ▲0.3747.86 ▼12.26
Posts /wp-admin/edit.php3.76 ▲0.4144.93 ▼0.32
Add New Post /wp-admin/post-new.php6.23 ▲0.3481.52 ▼22.68
Media Library /wp-admin/upload.php3.57 ▲0.3437.05 ▲3.63
Pro Version /wp-admin/admin.php?page=daextletal-pro-version3.5431.41
Help /wp-admin/admin.php?page=daextletal-help3.5432.40
Tables /wp-admin/admin.php?page=daextletal-tables4.3153.77
Options /wp-admin/admin.php?page=daextletal-options3.5434.70

Server storage [IO: ▲2.13MB] [DB: ▲0.32MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 91 new files
Database: 3 new tables, 18 new options
New tables
wp_daextletal_data
wp_daextletal_cell
wp_daextletal_table
New WordPress options
daextletal_tablesorter_library_url
db_upgraded
daextletal_verify_single_shortcode
widget_recent-posts
daextletal_max_execution_time
can_compress_scripts
daextletal_widget_text_shortcode
theysaidso_admin_options
daextletal_memory_limit
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for League Table
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲19213.54 ▼0.839.33 ▲7.3537.82 ▼10.85
Dashboard /wp-admin2,230 ▲565.62 ▼0.0685.93 ▼7.7738.84 ▼2.61
Posts /wp-admin/edit.php2,135 ▲351.99 ▼0.0037.86 ▲1.0831.80 ▼5.04
Add New Post /wp-admin/post-new.php1,554 ▲2623.33 ▲0.26602.91 ▲5.4260.62 ▲5.39
Media Library /wp-admin/upload.php1,435 ▲324.18 ▼0.0498.41 ▼4.9341.88 ▼0.99
Pro Version /wp-admin/admin.php?page=daextletal-pro-version8941.9923.3326.08
Help /wp-admin/admin.php?page=daextletal-help8402.0027.9328.15
Tables /wp-admin/admin.php?page=daextletal-tables5,5779.24305.8739.90
Options /wp-admin/admin.php?page=daextletal-options1,0572.2240.5333.33

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/league-table-lite/admin/view/tables.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/league-table-lite/admin/view/pro_version.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/league-table-lite/admin/view/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/league-table-lite/admin/view/help.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

league-table-lite/init.php 92% from 13 tests

"League Table" version 1.13's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("league-table-lite.php" instead of "init.php")

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin13,700 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript481,4281,5476,499
PHP111,0396574,526
CSS145211292,656
Markdown14019

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 102)
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity54.80
▷ Minimum class complexity12.00
▷ Maximum class complexity150.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity102.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods91
▷ Static methods77.69%
▷ Public methods8593.41%
▷ Protected methods00.00%
▷ Private methods66.59%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
15 PNG files occupy 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/edit.png1.28KB0.33KB▼ 74.12%
admin/assets/img/trash.png1.11KB0.19KB▼ 82.81%
admin/assets/img/clone-hover.png18.71KB0.12KB▼ 99.34%
admin/assets/img/has-cell-properties.png3.44KB0.13KB▼ 96.31%
admin/assets/inc/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%