84% aoplayer

Code Review | АвтоОфис.Видео

WordPress plugin АвтоОфис.Видео scored 84% from 54 tests.

About plugin

  • Plugin page: aoplayer
  • Plugin version: 1.0.15
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.9-7.3.10
  • WordPress version: 6.3.1
  • First release: Feb 4, 2019
  • Latest release: Dec 17, 2019
  • Number of updates: 31
  • Update frequency: every 10.3 days
  • Top authors: autooffice (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 852 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by АвтоОфис.Видео
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.34 ▼1.01
Dashboard /wp-admin3.38 ▲0.0747.31 ▲1.10
Posts /wp-admin/edit.php3.49 ▲0.1347.84 ▼1.82
Add New Post /wp-admin/post-new.php5.96 ▲0.0790.31 ▼2.94
Media Library /wp-admin/upload.php3.30 ▲0.0737.84 ▲0.12

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for АвтоОфис.Видео
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.29 ▼0.931.81 ▲0.0741.35 ▼11.15
Dashboard /wp-admin2,218 ▲305.82 ▲0.9297.91 ▼25.8987.86 ▲49.76
Posts /wp-admin/edit.php2,110 ▲211.98 ▼0.0437.69 ▲3.4433.66 ▼2.91
Add New Post /wp-admin/post-new.php1,527 ▲121.16 ▼2.41762.07 ▲12.0355.65 ▼6.36
Media Library /wp-admin/upload.php1,403 ▲184.14 ▼0.07113.23 ▲6.2879.20 ▲29.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/aoplayer/aoplayer_plugin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/aoplayer/views/admin_page_player.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/aoplayer/config.php:17
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/aoplayer/views/page_admin/__player.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: aoplayer

aoplayer/aoplayer_plugin.php 85% from 13 tests

The primary PHP file in "АвтоОфис.Видео" version 1.0.15 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aoplayer.php" instead of "aoplayer_plugin.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 541 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin24,052 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript723,15265316,287
SVG13023,035
CSS38288672,875
PHP83071051,692
PO File17576163

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity67.00
▷ Minimum class complexity60.00
▷ Maximum class complexity74.00
Average method complexity3.97
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods31
▷ Static methods516.13%
▷ Public methods2167.74%
▷ Protected methods13.23%
▷ Private methods929.03%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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
15 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/mediaelement/plugins/jump-forward/jumpforward.png1.22KB0.72KB▼ 40.69%
assets/img/logo.png6.18KB2.01KB▼ 67.51%
assets/img/icon.png0.81KB0.76KB▼ 6.38%
assets/mediaelement/player/mejs-controls.png14.38KB6.27KB▼ 56.42%
assets/mediaelement/plugins/playlist-rocco/mep-playlist-icons.png9.34KB2.68KB▼ 71.31%