84% elo-rating-shortcode

Code Review | Elo Rating Shortcode

WordPress plugin Elo Rating Shortcode scored 84% from 54 tests.

About plugin

  • Plugin page: elo-rating-shortcode
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: May 21, 2016
  • Latest release: Aug 7, 2023
  • Number of updates: 42
  • Update frequency: every 62.7 days
  • Top authors: mpol (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 2,706 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.61ms] Passed 4 tests

Server-side resources used by Elo Rating Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.29 ▼5.27
Dashboard /wp-admin3.32 ▲0.0246.08 ▲1.36
Posts /wp-admin/edit.php3.37 ▲0.0246.50 ▼6.31
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.15 ▼16.03
Media Library /wp-admin/upload.php3.25 ▲0.0235.30 ▲1.18

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Elo Rating Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.121.90 ▼0.1740.75 ▼11.84
Dashboard /wp-admin2,206 ▲215.82 ▼0.0699.14 ▲2.6939.09 ▼8.17
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0134.65 ▼6.2332.32 ▼7.90
Add New Post /wp-admin/post-new.php1,536 ▲323.31 ▲0.23664.16 ▲43.3452.05 ▲5.29
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.2094.87 ▼6.4640.41 ▼3.08

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/elo-rating-shortcode/shortcodes.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elo-rating-shortcode/elo-rating-shortcode.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: elo rating, calculations, calculator, board games, shortcode...

elo-rating-shortcode/elo-rating-shortcode.php 92% from 13 tests

This is the main PHP file of "Elo Rating Shortcode" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/lang/" does not exist

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 plugin190 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24336119
JavaScript117971
CSS1230

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin