84% yt-api-avoid-conflicts

Code Review | YT API Avoid Conflicts

WordPress plugin YT API Avoid Conflicts scored84%from 54 tests.

About plugin

  • Plugin page: yt-api-avoid-conf...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.1.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 12, 2018
  • Latest release: Jun 12, 2018
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: pushlabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /549 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by YT API Avoid Conflicts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.34 ▼2.43
Dashboard /wp-admin3.31 ▼0.0343.34 ▼21.94
Posts /wp-admin/edit.php3.37 ▲0.0155.70 ▲7.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.19 ▼14.48
Media Library /wp-admin/upload.php3.24 ▲0.0036.72 ▲5.52

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for YT API Avoid Conflicts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.60 ▼1.204.76 ▲2.9640.92 ▼2.38
Dashboard /wp-admin2,209 ▲304.86 ▼1.00111.30 ▲6.7244.28 ▲2.89
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0043.01 ▼0.4140.57 ▲7.14
Add New Post /wp-admin/post-new.php1,542 ▲418.03 ▼5.17639.58 ▲16.7649.14 ▼2.78
Media Library /wp-admin/upload.php1,382 ▼94.27 ▲0.0897.62 ▼3.9443.53 ▼1.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/yt-api-avoid-conflicts/yt-api-avoid-conflicts.php:18

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
1 plugin tags: youtube api

yt-api-avoid-conflicts/yt-api-avoid-conflicts.php Passed 13 tests

The main file in "YT API Avoid Conflicts" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
93 characters long description:
A WordPress plugin to avoid conflicts with the onYouTubePlayerAPIReady() YouTube API function

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 plugin14 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP153513
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin