83% pyts-count

Code Review | Pyts YouTube Subs

WordPress plugin Pyts YouTube Subs scored83%from 54 tests.

About plugin

  • Plugin page: pyts-count
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2021
  • Latest release: Sep 3, 2022
  • Number of updates: 4
  • Update frequency: every 65.0 days
  • Top authors: poran766 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /322 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.80ms] Passed 4 tests

A check of server-side resources used by Pyts YouTube Subs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.73 ▲0.08
Dashboard /wp-admin3.34 ▲0.0344.73 ▼4.45
Posts /wp-admin/edit.php3.39 ▲0.0344.59 ▲0.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.10 ▼12.11
Media Library /wp-admin/upload.php3.26 ▲0.0334.42 ▼2.69

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_pyts_widget

Browser metrics Passed 4 tests

A check of browser resources used by Pyts YouTube Subs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.37 ▼1.016.91 ▲5.1341.87 ▼4.06
Dashboard /wp-admin2,206 ▲154.89 ▼0.00103.04 ▼3.3039.15 ▼5.60
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0136.38 ▼1.6236.38 ▲2.67
Add New Post /wp-admin/post-new.php1,542 ▲2818.44 ▲0.71597.67 ▼92.2556.26 ▲1.44
Media Library /wp-admin/upload.php1,391 ▲64.20 ▼0.05103.21 ▼7.1842.90 ▼5.61

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_pyts_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pyts-count/includes/pyts-count-class.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pyts-count/includes/pyts-scripts.php:15

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)
No browser issues were found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Donate link: Invalid url: ""
The official readme.txt might help

pyts-count/pyts-youtube-subs.php 69% from 13 tests

Analyzing the main PHP file in "Pyts YouTube Subs" version 1.2.0
It is important to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Git Repository: An alternative Git repository was detected
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pyts-count.php" instead of "pyts-youtube-subs.php")

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
Good job! No executable or dangerous file extensions detected102 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35356101
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected