78% aml-league

Code Review | AML League

WordPress plugin AML League scored78%from 54 tests.

About plugin

  • Plugin page: aml-league
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3.2
  • WordPress version: 6.3.1
  • First release: Sep 26, 2023
  • Latest release: Nov 26, 2023
  • Number of updates: 16
  • Update frequency: every 4.1 days
  • Top authors: loloirie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /240 total downloads

Benchmarks

Plugin footprint 82% 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.23MB] [CPU: ▼4.20ms] Passed 4 tests

An overview of server-side resources used by AML League
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2338.63 ▼4.73
Dashboard /wp-admin3.55 ▲0.2048.49 ▼15.38
Posts /wp-admin/edit.php3.60 ▲0.2452.88 ▲2.69
Add New Post /wp-admin/post-new.php6.51 ▲0.6298.72 ▲3.43
Media Library /wp-admin/upload.php3.47 ▲0.2435.92 ▲0.63

Server storage [IO: ▲58.80MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • Filesystem usage must be lower than 25MB (currently using 58.80MB)
Filesystem: 1,481 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for AML League
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,955 ▲20814.60 ▲0.3331.10 ▲29.3038.16 ▼4.74
Dashboard /wp-admin2,245 ▲675.99 ▲0.2795.98 ▼19.6593.00 ▲50.02
Posts /wp-admin/edit.php2,162 ▲622.25 ▲0.2741.40 ▲5.3134.24 ▼0.11
Add New Post /wp-admin/post-new.php6,410 ▲4,88425.97 ▲2.60839.07 ▲166.6860.97 ▲15.64
Media Library /wp-admin/upload.php1,465 ▲624.44 ▲0.1396.66 ▼0.2573.24 ▲31.97

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 17× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/aml-league/tags/1.2.3/tags/1.2/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/tags/1.2.1/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/tags/1.2.3/tags/1.2.1/tags/1.2/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/tags/1.2.3/tags/1.2.2/tags/1.2.1/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/tags/1.2.5/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/tags/1.2.1/tags/1.2/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/tags/1.2.2/tags/1.2/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/tags/1.2/admin/index_html/footer.php
    • > /wp-content/plugins/aml-league/tags/1.2.3/tags/1.2.2/admin/index_html/footer.php
  • 1035× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/aml-league/tags/1.2/shortcodes/sc_html/aml-league-print_html.php:20
    • > PHP Notice
      Undefined variable: club_guid in wp-content/plugins/aml-league/tags/1.2.2/tags/1.2/shortcodes/sc_html/aml-league-player_html.php on line 35
    • > PHP Notice
      Undefined variable: player_profile_id in wp-content/plugins/aml-league/tags/1.2.2/tags/1.2.1/shortcodes/sc_html/aml-league-player_html.php on line 25
    • > PHP Notice
      Undefined variable: html in wp-content/plugins/aml-league/tags/1.2.3/tags/1.2.1/tags/1.2/shortcodes/sc_html/aml-league-table_html.php on line 18
    • > PHP Notice
      Undefined variable: datatable_id in wp-content/plugins/aml-league/tags/1.2.3/shortcodes/sc_html/aml-league-tops_html.php on line 76
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/aml-league/tags/1.2.3/tags/1.2.2/aml-posttypes/aml-pt-matchs.php:5
    • > PHP Notice
      Undefined variable: datatable_id in wp-content/plugins/aml-league/tags/1.2.1/shortcodes/sc_html/aml-league-tops_html.php on line 77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/aml-league/tags/1.2.2/tags/1.2.1/tags/1.2/shortcodes/sc_html/aml-league-print_html.php:20
    • > PHP Notice
      Undefined variable: playerCONTACT in wp-content/plugins/aml-league/tags/1.2.3/tags/1.2/shortcodes/sc_html/aml-league-player_html.php on line 37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/aml-league/tags/1.2.1/tags/1.2/shortcodes/sc_html/aml-league-print_html.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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:
  • Screenshots: These screenshots lack descriptions #2, #3, #4, #5, #6 in aml-league/assets to your readme.txt
Please take inspiration from this readme.txt

aml-league/aml-league.php Passed 13 tests

The main PHP script in "AML League" version 1.2.5 is automatically included on every request by WordPress
47 characters long description:
Badminton / Tennis / Table tennis League Plugin

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
Success! There were no dangerous files found in this plugin19,859 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
PHP554,0162,82412,328
JavaScript62774132,844
CSS102601872,815
PO File38081,0351,872

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity45.62
▷ Minimum class complexity2.00
▷ Maximum class complexity126.00
Average method complexity5.70
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes68
▷ Abstract classes00.00%
▷ Concrete classes68100.00%
▷ Final classes00.00%
Methods646
▷ Static methods172.63%
▷ Public methods62997.37%
▷ Protected methods00.00%
▷ Private methods172.63%
Functions884
▷ Named functions884100.00%
▷ Anonymous functions00.00%
Constants527
▷ Global constants527100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
287 PNG files occupy 31.16MB with 15.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tags/1.2.3/tags/1.2.2/tags/1.2.1/fjs/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
tags/1.2.3/tags/1.2.2/assets/screenshot-6.png90.13KB33.08KB▼ 63.30%
tags/1.2.3/tags/1.2.2/tags/1.2/doc/templates_hierarchy.png203.18KB60.81KB▼ 70.07%
tags/1.2.3/tags/1.2.1/tags/1.2/images/print.png20.54KB9.16KB▼ 55.41%
tags/1.2.5/assets/screenshot-1.png96.05KB41.52KB▼ 56.77%