10% aklamator-twitch-classic

Code Review | Aklamator Twitch

WordPress plugin Aklamator Twitch scored10%from 54 tests.

About plugin

  • Plugin page: aklamator-twitch-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 29, 2018
  • Latest release: Jul 16, 2018
  • Number of updates: 6
  • Update frequency: every 3.0 days
  • Top authors: aklamator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,047 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method AklamatorTwitchPrWidget::set_up_options() should not be called statically

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.55ms] Passed 4 tests

An overview of server-side resources used by Aklamator Twitch
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.99 ▲3.89
Dashboard /wp-admin3.39 ▲0.0448.46 ▼8.10
Posts /wp-admin/edit.php3.50 ▲0.1445.14 ▲1.24
Add New Post /wp-admin/post-new.php5.97 ▲0.0878.89 ▼15.66
Media Library /wp-admin/upload.php3.31 ▲0.0832.82 ▲0.33

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 15 new options
New WordPress options
theysaidso_admin_options
aklamatorTwitchChannelName
aklamatorTwitchApplicationID
widget_recent-comments
aklamatorTwitchSingleWidgetTitle
aklamatorTwitchWidgets
db_upgraded
aklamatorTwitchGameName
aklamatorTwitchPageWidgetID
aklamatorTwitchSingleWidgetID
...

Browser metrics Passed 4 tests

Aklamator Twitch: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.40 ▼0.201.77 ▲0.1844.52 ▲4.01
Dashboard /wp-admin2,213 ▲365.56 ▼0.0895.84 ▼2.2770.02 ▲25.01
Posts /wp-admin/edit.php2,112 ▲121.96 ▼0.0335.56 ▲1.1132.92 ▼4.80
Add New Post /wp-admin/post-new.php1,693 ▲16522.58 ▼0.55699.91 ▲15.2349.78 ▼0.31
Media Library /wp-admin/upload.php1,409 ▲94.21 ▲0.0194.06 ▲0.0263.23 ▲18.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method AklamatorTwitchPrWidget::aklamator_uninstall() should not be called statically
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_wp_widget_aklamatortwitch
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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 | 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/aklamator-twitch-classic/includes/class-aklamatorTwitch-widget-pr.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/aklamator-twitch-classic/views/admin-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/aklamator-twitch-classic/aklamator-twitch.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === aklamator-twitch-classic === )
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

aklamator-twitch-classic/aklamator-twitch.php 85% from 13 tests

"Aklamator Twitch" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("aklamator-twitch-classic.php" instead of "aklamator-twitch.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected858 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP415749536
JavaScript2285228
CSS213394

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity19.00
▷ Minimum class complexity11.00
▷ Maximum class complexity27.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods1986.36%
▷ Protected methods00.00%
▷ Private methods313.64%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
9 PNG files occupy 0.46MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/aklamator-icon.png1.76KB0.82KB▼ 53.53%
assets/dataTables/images/sort_desc_disabled.png1.09KB0.17KB▼ 84.55%
images/teaser-810x262.png279.89KB88.35KB▼ 68.43%
assets/dataTables/images/sort_desc.png1.10KB0.17KB▼ 84.15%
images/logo.png101.95KB36.96KB▼ 63.74%