84% wp-able-player

Code Review | Able Player for WordPress

WordPress plugin Able Player for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: wp-able-player
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 0.71-5.2.1
  • WordPress version: 6.3.1
  • First release: Jul 3, 2017
  • Latest release: May 27, 2019
  • Number of updates: 7
  • Update frequency: every 99.1 days
  • Top authors: darmentrout (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /1,951 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.47ms] Passed 4 tests

Server-side resources used by Able Player for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.82 ▼3.68
Dashboard /wp-admin3.32 ▼0.0356.30 ▼11.96
Posts /wp-admin/edit.php3.37 ▲0.0149.72 ▲2.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0199.64 ▼0.21
Media Library /wp-admin/upload.php3.24 ▲0.0138.92 ▼2.03

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 110 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Able Player for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.36 ▼0.192.07 ▼0.0045.84 ▲2.12
Dashboard /wp-admin2,195 ▲155.67 ▲0.0691.05 ▼8.4741.87 ▼3.23
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0139.01 ▲3.3935.23 ▲0.20
Add New Post /wp-admin/post-new.php1,546 ▲1523.18 ▲0.09651.03 ▼8.1153.21 ▼0.64
Media Library /wp-admin/upload.php1,403 ▲94.25 ▼0.0197.34 ▼3.1842.74 ▼4.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • 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)
Good news, no errors were detected

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 items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-able-player/able-player-for-wp.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function able_media_type() in wp-content/plugins/wp-able-player/markup.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can take inspiration from this readme.txt

wp-able-player/able-player-for-wp.php 92% from 13 tests

The main PHP script in "Able Player for WordPress" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-able-player.php" instead of "able-player-for-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin32,346 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript385,3714,32730,634
CSS253233952
Markdown11450508
SVG200156
PHP2301974
JSON10022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
57 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ableplayer/button-icons/white/chapters.png0.24KB0.21KB▼ 11.20%
ableplayer/button-icons/black/rewind.png0.26KB0.21KB▼ 16.35%
ableplayer/button-icons/black/volume-loud.png0.39KB0.31KB▼ 21.30%
ableplayer/button-icons/white/descriptions.png0.42KB0.33KB▼ 23.22%
ableplayer/button-icons/white/sign.png0.41KB0.33KB▼ 18.91%