78% podcast-subscribe-buttons

Code Review | Podcast Subscribe Buttons

WordPress plugin Podcast Subscribe Buttons scored78%from 54 tests.

About plugin

  • Plugin page: podcast-subscribe...
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Aug 26, 2018
  • Latest release: Oct 4, 2023
  • Number of updates: 50
  • Update frequency: every 37.3 days
  • Top authors: secondlinethemes (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

7,000+ active /117,416 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.73MB] [CPU: ▲0.87ms] Passed 4 tests

Analyzing server-side resources used by Podcast Subscribe Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4743.46 ▲3.54
Dashboard /wp-admin4.13 ▲0.7950.81 ▼11.69
Posts /wp-admin/edit.php4.21 ▲0.8649.79 ▲3.09
Add New Post /wp-admin/post-new.php6.78 ▲0.89100.64 ▲8.53
Media Library /wp-admin/upload.php4.05 ▲0.8245.33 ▲10.47
Podcast Subscribe Buttons /wp-admin/edit.php?post_type=secondline_psb_post4.1042.31

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 501 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Podcast Subscribe Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16313.52 ▼0.839.00 ▲7.4642.25 ▲3.26
Dashboard /wp-admin2,229 ▲485.64 ▼0.0483.96 ▼11.7638.59 ▼0.53
Posts /wp-admin/edit.php2,138 ▲382.09 ▲0.0940.40 ▲3.4933.42 ▼5.41
Add New Post /wp-admin/post-new.php6,401 ▲4,87027.70 ▲4.69876.57 ▲264.7638.91 ▼12.20
Media Library /wp-admin/upload.php1,440 ▲404.31 ▲0.07112.74 ▲15.7748.02 ▲5.41
Podcast Subscribe Buttons /wp-admin/edit.php?post_type=secondline_psb_post1,1102.0433.7331.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/podcast-subscribe-buttons/template-parts/list-button.php
    • > /wp-content/plugins/podcast-subscribe-buttons/template-parts/icon-button.php
    • > /wp-content/plugins/podcast-subscribe-buttons/template-parts/inline-button.php
  • 50× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/podcast-subscribe-buttons/includes/CMB2/cmb2-plugin/includes/types/CMB2_Type_Colorpicker.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/podcast-subscribe-buttons/includes/CMB2/cmb2-plugin/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup' not found in wp-content/plugins/podcast-subscribe-buttons/includes/CMB2/cmb2-plugin/includes/CMB2_Options_Hookup.php:14
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/podcast-subscribe-buttons/template-parts/inline-button.php on line 9
    • > PHP Notice
      Undefined variable: atts in wp-content/plugins/podcast-subscribe-buttons/template-parts/icon-button.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/podcast-subscribe-buttons/includes/CMB2/cmb2-plugin/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/podcast-subscribe-buttons/includes/CMB2/cmb2-plugin/includes/CMB2_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Multicheck' not found in wp-content/plugins/podcast-subscribe-buttons/includes/CMB2/cmb2-plugin/includes/types/CMB2_Type_Taxonomy_Multicheck_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/podcast-subscribe-buttons/includes/CMB2/cmb2-plugin/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/podcast-subscribe-buttons/includes/CMB2/cmb2-plugin/includes/types/CMB2_Type_Counter_Base.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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: The official readme.txt is a good inspiration

podcast-subscribe-buttons/podcast-subscribe-buttons.php 92% from 13 tests

This is the main PHP file of "Podcast Subscribe Buttons" version 1.5.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected96,482 lines of code in 283 files:
LanguageFilesBlank linesComment linesLines of code
JSON20046,482
PO File12014,31518,50232,323
PHP652,1816,2507,418
CSS132771,1924,665
JavaScript154026252,101
Sass17306291,411
SVG49111,384
Markdown22250698

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity19.01
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes69
▷ Abstract classes913.04%
▷ Concrete classes6086.96%
▷ Final classes00.00%
Methods544
▷ Static methods9517.46%
▷ Public methods45283.09%
▷ Protected methods8916.36%
▷ Private methods30.55%
Functions36
▷ Named functions3391.67%
▷ Anonymous functions38.33%
Constants12
▷ Global constants650.00%
▷ Class constants650.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
84 PNG files occupy 0.35MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/icons/Acast.png3.05KB2.55KB▼ 16.57%
assets/img/icons/Deezer.png5.04KB1.68KB▼ 66.75%
assets/img/icons/Anchor.png1.71KB1.77KB0.00%
assets/img/icons/Gaana.png1.06KB1.42KB0.00%
assets/img/icons/SoundCarrot.png65.24KB24.38KB▼ 62.63%