84% utilities-for-mtg

Code Review | Utilities for MTG

WordPress plugin Utilities for MTG scored84%from 54 tests.

About plugin

  • Plugin page: utilities-for-mtg
  • Plugin version: 1.4.0
  • PHP compatiblity: 5.5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.5
  • WordPress version: 6.3.1
  • First release: Sep 28, 2018
  • Latest release: Sep 27, 2020
  • Number of updates: 13
  • Update frequency: every 56.2 days
  • Top authors: yunra (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,368 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.99ms] Passed 4 tests

Server-side resources used by Utilities for MTG
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.76 ▲6.70
Dashboard /wp-admin3.34 ▲0.0042.83 ▼14.27
Posts /wp-admin/edit.php3.40 ▲0.0441.68 ▼2.99
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.91 ▼10.46
Media Library /wp-admin/upload.php3.27 ▲0.0433.73 ▼0.22

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

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

Browser metrics Passed 4 tests

Utilities for MTG: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4714.35 ▲0.001.72 ▼0.0741.82 ▲2.86
Dashboard /wp-admin2,198 ▲215.54 ▼0.0790.32 ▲0.8353.53 ▲8.39
Posts /wp-admin/edit.php2,100 ▼01.95 ▲0.0136.39 ▲2.4233.67 ▼1.76
Add New Post /wp-admin/post-new.php1,526 ▼523.30 ▲0.32640.18 ▼4.5763.77 ▲10.80
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.0098.74 ▼10.9942.77 ▼3.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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 items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/utilities-for-mtg/utilitiesformtg.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: magic, scryfall, tcg, mtg

utilities-for-mtg/utilitiesformtg.php 85% from 13 tests

The main file in "Utilities for MTG" v. 1.4.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("utilities-for-mtg.php" instead of "utilitiesformtg.php")
  • Description: The description should be shorter than 140 characters (currently 165 characters long)

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 detected251 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP15952235
CSS1409
JavaScript1007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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