84% plyr

Code Review | Plyr

WordPress plugin Plyr scored84%from 54 tests.

About plugin

  • Plugin page: plyr
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5.2
  • WordPress version: 6.3.1
  • First release: May 27, 2016
  • Latest release: Jun 9, 2016
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: drrobotnik (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /9,780 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Plyr
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.58 ▲1.53
Dashboard /wp-admin3.32 ▼0.0345.94 ▼14.54
Posts /wp-admin/edit.php3.37 ▲0.0142.14 ▲0.52
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.08 ▼3.50
Media Library /wp-admin/upload.php3.24 ▲0.0134.61 ▲2.19

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Plyr
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12113.62 ▼1.0310.25 ▲8.6141.25 ▼0.76
Dashboard /wp-admin2,199 ▲195.65 ▼0.0192.82 ▲6.9841.75 ▲1.41
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0235.32 ▲0.2431.12 ▼7.32
Add New Post /wp-admin/post-new.php1,530 ▲423.38 ▲0.16652.76 ▼6.5464.15 ▲12.80
Media Library /wp-admin/upload.php1,404 ▲14.20 ▼0.06112.32 ▲15.1948.20 ▲6.28

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/plyr/public/partials/plyr-public-display.php
    • > /wp-content/plugins/plyr/admin/partials/plyr-admin-display.php

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add a description for screenshot #1 in plyr/assets to your readme.txt
You can take inspiration from this readme.txt

plyr/plyr.php Passed 13 tests

The primary PHP file in "Plyr" version 1.0.1 is used by WordPress to initiate all plugin functionality
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin189 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12129524182
JavaScript32276
CSS2041

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1979.17%
▷ Protected methods00.00%
▷ Private methods520.83%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin