87% aibuy-player

Code Review | AIBuy Simple Content Video Player

WordPress plugin AIBuy Simple Content Video Player scored 87% from 54 tests.

About plugin

  • Plugin page: aibuy-player
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.8.1
  • First release: Jun 29, 2018
  • Latest release: Jun 29, 2018
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: billizzard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 379 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼147.44ms] Passed 4 tests

Server-side resources used by AIBuy Simple Content Video Player
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.1838.06 ▲16.41
Dashboard /wp-admin3.12 ▲0.0744.42 ▼2.35
Posts /wp-admin/edit.php3.23 ▲0.1242.37 ▲6.83
Add New Post /wp-admin/post-new.php5.49 ▲0.0689.68 ▼584.69
Media Library /wp-admin/upload.php3.06 ▲0.0631.56 ▼9.55
AIBuy Player /wp-admin/options-general.php?page=aibuy_player3.0329.33

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by AIBuy Simple Content Video Player
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲22316.29 ▲0.369.68 ▼0.1548.34 ▼2.16
Dashboard /wp-admin2,996 ▲656.11 ▲0.05139.12 ▼21.93114.95 ▼2.33
Posts /wp-admin/edit.php2,746 ▲102.69 ▲0.0068.35 ▲0.2888.00 ▼5.03
Add New Post /wp-admin/post-new.php1,906 ▲23019.15 ▼0.04369.39 ▼3.47111.19 ▲2.77
Media Library /wp-admin/upload.php1,814 ▲45.03 ▲0.01150.33 ▲6.84120.53 ▼4.86
AIBuy Player /wp-admin/options-general.php?page=aibuy_player1,0892.0957.4383.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/aibuy-player/admin/partials/aibuy_simple_content_video_player-admin-display.php
    • > /wp-content/plugins/aibuy-player/public/partials/aibuy_simple_content_video_player-public-display.php
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: successSubmit in wp-content/plugins/aibuy-player/admin/index.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/aibuy-player/admin/index.php on line 18
    • > PHP Notice
      Undefined variable: values in wp-content/plugins/aibuy-player/admin/index.php on line 18
    • > PHP Notice
      Undefined variable: errorSubmit in wp-content/plugins/aibuy-player/admin/index.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'Aibuy_simple_content_video_player' not found in wp-content/plugins/aibuy-player/admin/index.php:19

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


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (The plugin add button to the editor), #2 (Inserts a video player in public part), #3 (Page with settings)
The official readme.txt might help

aibuy-player/aibuy_simple_content_video_player.php 85% from 13 tests

Analyzing the main PHP file in "AIBuy Simple Content Video Player" version 1.0.0
You should first fix the following items:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("aibuy-player.php" instead of "aibuy_simple_content_video_player.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin534 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.34
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.65MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/js/video.png1.24KB0.55KB▼ 55.86%
screenshot-3.png113.31KB38.94KB▼ 65.64%
screenshot-2.png401.23KB142.29KB▼ 64.54%
screenshot-1.png145.60KB51.53KB▼ 64.61%
admin/js/video-icon.png1.18KB0.52KB▼ 55.51%