10% apester-interactive-content

Code Review | Apester Interactive Content

WordPress plugin Apester Interactive Content scored10%from 54 tests.

About plugin

  • Plugin page: apester-interacti...
  • Plugin version: 2.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.4
  • WordPress version: 6.3.1
  • First release: Dec 8, 2014
  • Latest release: May 31, 2020
  • Number of updates: 132
  • Update frequency: every 15.2 days
  • Top authors: oraricha (37.12%)shushu.i (32.58%)benkalsky (9.85%)danielbrotzky (7.58%)johnbenz (6.06%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /31,538 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/apester-interactive-content/inc/events.php+62
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.73MB] [CPU: ▼28.65ms] Passed 4 tests

Server-side resources used by Apester Interactive Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.11 ▼3.65
Dashboard /wp-admin3.21 ▼0.0926.79 ▼20.58
Posts /wp-admin/edit.php3.21 ▼0.1425.44 ▼20.87
Add New Post /wp-admin/post-new.php3.21 ▼2.6824.80 ▼67.63
Media Library /wp-admin/upload.php3.21 ▼0.0226.35 ▼5.50
Apester /wp-admin/options-general.php?page=qmerce-settings-admin3.2124.09

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 9 new options
New WordPress options
qmerce-settings-admin
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
apester-tokens-sent
widget_recent-posts
can_compress_scripts
tokens-publish-option-updated
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Apester Interactive Content
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲13914.27 ▼0.1312.10 ▲10.3042.07 ▼3.87
Dashboard /wp-admin2,230 ▲455.31 ▼0.56105.69 ▲1.1836.76 ▼7.00
Posts /wp-admin/edit.php2,095 ▲32.50 ▲0.5036.73 ▼2.6632.65 ▼6.13
Add New Post /wp-admin/post-new.php1,533 ▲1623.11 ▲5.45623.88 ▼43.0651.08 ▲0.15
Media Library /wp-admin/upload.php1,406 ▲184.55 ▲0.36105.05 ▲6.9339.48 ▼4.41
Apester /wp-admin/options-general.php?page=qmerce-settings-admin9422.4530.1631.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/apester-interactive-content/inc/qmerce-settings.class.php+323
    Undefined index: playlist_enabled_tokens
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • apester-tokens-sent
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • tokens-publish-option-updated
    • qmerce-settings-admin

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=qmerce-settings-admin
    • > Notice in wp-content/plugins/apester-interactive-content/inc/qmerce-settings.class.php+323
    Undefined index: playlist_enabled_tokens
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qmerce-settings-admin
    • > Notice in wp-content/plugins/apester-interactive-content/views/settings.tpl.php+292
    Undefined index: auth_token
    • > GET request to /wp-admin/options-general.php?page=qmerce-settings-admin
    • > Notice in wp-content/plugins/apester-interactive-content/inc/tinymce.php+43
    Undefined index: apester_tags
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=qmerce-settings-admin
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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 fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/apester-interactive-content/inc/qmerce-admin-box.class.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/apester-interactive-content/qmerce.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/apester-interactive-content/views/settings.tpl.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'QmerceTagComposer' not found in wp-content/plugins/apester-interactive-content/inc/qmerce-shortcodes.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/apester-interactive-content/inc/qmerce-settings.class.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/apester-interactive-content/inc/qmerce-widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #6, #7, #8, #9 in apester-interactive-content/assets to your readme.txt
  • Tags: You are using too many tags: 13 tag instead of maximum 10
The official readme.txt is a good inspiration

apester-interactive-content/qmerce.php 77% from 13 tests

The entry point to "Apester Interactive Content" version 2.1.4 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("apester-interactive-content.php" instead of "qmerce.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 215 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected8,234 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS61005,535
JavaScript72894261,396
PHP113093361,273
SVG23030

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.75
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods3764.91%
▷ Protected methods610.53%
▷ Private methods1424.56%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants17
▷ Global constants1588.24%
▷ Class constants211.76%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.41MB with 0.31MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/banana@2x.png84.36KB21.53KB▼ 74.48%
public/img/embedding@2x.png248.05KB59.48KB▼ 76.02%
public/img/playlist_position/bottom@2x.png4.86KB1.16KB▼ 76.05%
public/img/playlist_position/top@2x.png4.82KB1.17KB▼ 75.81%
public/img/playlist_position/middle@2x.png4.82KB1.17KB▼ 75.77%