72% youtube-dev-facile

Code Review | YouTube Dev Facile

WordPress plugin YouTube Dev Facile scored72%from 54 tests.

About plugin

  • Plugin page: youtube-dev-facile
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: May 11, 2015
  • Latest release: May 11, 2015
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: Matthieu20 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /901 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
Installer ran successfully

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

This is a short check of server-side resources used by YouTube Dev Facile
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.74 ▼0.56
Dashboard /wp-admin3.39 ▲0.0850.08 ▲0.33
Posts /wp-admin/edit.php3.50 ▲0.1545.61 ▲1.60
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.48 ▼23.40
Media Library /wp-admin/upload.php3.31 ▲0.0833.96 ▲4.65

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

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

Browser metrics Passed 4 tests

Checking browser requirements for YouTube Dev Facile
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.001.71 ▼0.2443.75 ▲0.19
Dashboard /wp-admin2,210 ▲194.86 ▼0.0697.85 ▼17.6837.54 ▼8.16
Posts /wp-admin/edit.php2,090 ▼22.14 ▲0.1235.97 ▼1.7234.91 ▲0.83
Add New Post /wp-admin/post-new.php1,536 ▲123.28 ▲0.14598.56 ▼68.8854.32 ▼4.02
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.0494.97 ▼3.9840.84 ▼4.46
YouTube DevFacile /wp-admin/api-YT-devfacile.php260.440.1415.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/youtube-dev-facile/languages/strings.php
    • > /wp-content/plugins/youtube-dev-facile/youtube-devfacile.php
  • 78× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/QPXExpress.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/Plus.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/Pagespeedonline.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/Manager.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/Replicapoolupdater.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/AndroidEnterprise.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/GamesConfiguration.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/SiteVerification.php:31
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/youtube-dev-facile/google-api-client/../autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/youtube-dev-facile/google-api-client/Collection.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/youtube-dev-facile/google-api-client/Service/Gmail.php:31

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/api-YT-devfacile.php
    • > Network (severe)
    wp-admin/api-YT-devfacile.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Administration du plugin YouTube Dev Facile.), #2 (Affiche le nombre de vidéos de la chaîne YouTube et le nombre de vues dans un Widget.), #3 (Résultat de l'affichage dans un Widget.)
You can look at the official readme.txt

youtube-dev-facile/youtube-devfacile.php 77% from 13 tests

The main file in "YouTube Dev Facile" v. 0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 533 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("youtube-dev-facile.php" instead of "youtube-devfacile.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin166,322 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
PHP13010,84131,876166,220
PO File22040102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.01
Average class complexity1.19
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity1.02
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes3,026
▷ Abstract classes60.20%
▷ Concrete classes3,02099.80%
▷ Final classes00.00%
Methods23,619
▷ Static methods150.06%
▷ Public methods23,55299.72%
▷ Protected methods300.13%
▷ Private methods370.16%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants249
▷ Global constants52.01%
▷ Class constants24497.99%
▷ Public constants244100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.30MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png50.43KB17.82KB▼ 64.66%
assets/icon-256x256.png31.06KB14.30KB▼ 53.96%
assets/icon-128x128.png14.01KB6.80KB▼ 51.43%
assets/banner-772x250.png24.08KB10.90KB▼ 54.72%
screenshot-2.png32.89KB10.67KB▼ 67.56%