83% platys-twitch-list

Code Review | Platys Twitch List

WordPress plugin Platys Twitch List scored83%from 54 tests.

About plugin

  • Plugin page: platys-twitch-list
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8
  • WordPress version: 6.3.1
  • First release: Sep 8, 2021
  • Latest release: Sep 8, 2021
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: platypusmuerte (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /288 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.67ms] Passed 4 tests

Analyzing server-side resources used by Platys Twitch List
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.25 ▼5.39
Dashboard /wp-admin3.36 ▲0.0146.35 ▼15.27
Posts /wp-admin/edit.php3.47 ▲0.1153.01 ▲5.89
Add New Post /wp-admin/post-new.php5.96 ▲0.0794.14 ▼1.43
Media Library /wp-admin/upload.php3.28 ▲0.0533.94 ▼0.59

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

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

Browser metrics Passed 4 tests

Platys Twitch List: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.62 ▼0.684.81 ▲2.9738.85 ▼8.29
Dashboard /wp-admin2,224 ▲335.83 ▼0.0795.52 ▼6.8784.41 ▲43.84
Posts /wp-admin/edit.php2,107 ▲182.03 ▼0.0038.41 ▲2.1935.86 ▼0.27
Add New Post /wp-admin/post-new.php1,528 ▲817.49 ▼5.65721.50 ▲91.5656.59 ▲9.12
Media Library /wp-admin/upload.php1,406 ▲154.12 ▼0.07111.61 ▲11.8445.98 ▲0.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/platys-twitch-list/public/partials/platys_twitch_list-public-display.php
    • > /wp-content/plugins/platys-twitch-list/admin/partials/platys_twitch_list-admin-display.php

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === platys-twitch-list === )
Please take inspiration from this readme.txt

platys-twitch-list/platys_twitch_list.php 85% from 13 tests

The principal PHP file in "Platys Twitch List" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("platys-twitch-list.php" instead of "platys_twitch_list.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected222 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12114422213
JavaScript24546
CSS2083

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods26
▷ Static methods311.54%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/platybot_r2_30x30.png1.45KB1.36KB▼ 6.22%
assets/icon-128x128.png12.01KB4.10KB▼ 65.89%