78% liteweight-podcast

Code Review | Liteweight Podcast

WordPress plugin Liteweight Podcast scored78%from 54 tests.

About plugin

  • Plugin page: liteweight-podcast
  • Plugin version: 2.2.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Mar 7, 2019
  • Latest release: Oct 14, 2023
  • Number of updates: 62
  • Update frequency: every 27.1 days
  • Top authors: abuhayat (72.58%)shehabulislam (29.03%)

Code review

54 tests

User reviews

9 reviews

Install metrics

600+ active /10,730 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼10.19ms] Passed 4 tests

Server-side resources used by Liteweight Podcast
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2745.65 ▼16.45
Dashboard /wp-admin3.57 ▲0.2253.76 ▼9.79
Posts /wp-admin/edit.php3.62 ▲0.2651.12 ▼3.26
Add New Post /wp-admin/post-new.php6.17 ▲0.2987.46 ▼11.25
Media Library /wp-admin/upload.php3.43 ▲0.2040.79 ▲2.57
Podcasts /wp-admin/edit.php?post_type=podcast3.5645.81
Add new program /wp-admin/post-new.php?post_type=podcast6.1687.34
Settings /wp-admin/edit.php?post_type=podcast&page=pdp-settings3.4341.54

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Liteweight Podcast
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲17213.58 ▼0.777.93 ▲5.8142.58 ▼7.98
Dashboard /wp-admin2,243 ▲635.59 ▼0.0790.47 ▲1.3438.53 ▼3.67
Posts /wp-admin/edit.php2,148 ▲482.03 ▲0.0638.42 ▲1.5632.41 ▼3.81
Add New Post /wp-admin/post-new.php6,236 ▲4,71019.10 ▼4.47944.56 ▲282.1040.11 ▼13.43
Media Library /wp-admin/upload.php1,451 ▲514.24 ▲0.0398.50 ▼5.2743.26 ▼4.77
Podcasts /wp-admin/edit.php?post_type=podcast1,3283.6850.4027.85
Add new program /wp-admin/post-new.php?post_type=podcast11,18624.961,144.4070.44
Settings /wp-admin/edit.php?post_type=podcast&page=pdp-settings1,0943.3950.8928.56

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
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • pdp_isgutenberg_import
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • pdp_option
    • widget_recent-posts
    • pdp_import

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PDP\\Model\\add_action() in wp-content/plugins/liteweight-podcast/inc/Model/EnqueueAssets.php:7
    • > PHP Warning
      Use of undefined constant PDP_PLUGIN_PATH - assumed 'PDP_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/liteweight-podcast/admin/inc/metabox.php on line 3
    • > PHP Warning
      require_once(PDP_PLUGIN_PATHadmin/framework/framework.php): failed to open stream: No such file or directory in wp-content/plugins/liteweight-podcast/admin/inc/metabox.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'PDP_PLUGIN_PATHadmin/framework/framework.php' (include_path='.:/usr/share/php') in wp-content/plugins/liteweight-podcast/admin/inc/metabox.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PDP\\Services\\add_shortcode() in wp-content/plugins/liteweight-podcast/inc/Services/Shortcode.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/liteweight-podcast/liteweight-podcast.php:14
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/liteweight-podcast/liteweight-podcast.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PDP\\Model\\add_action() in wp-content/plugins/liteweight-podcast/inc/Model/EnqueueAssets.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PDP\\PostType\\add_action() in wp-content/plugins/liteweight-podcast/inc/PostType/podcast.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=podcast
    • > Network (severe)
    wp-admin/audio - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed: The official readme.txt might help

liteweight-podcast/liteweight-podcast.php Passed 13 tests

"Liteweight Podcast" version 2.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
39 characters long description:
A lite weight wordpress podcast plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin28,675 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP922,6821,1258,444
PO File203,0373,4146,180
Sass1796334,920
CSS112924784,189
JavaScript121,2553533,989
HTML21380864
SVG40089

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity22.80
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity6.24
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes74
▷ Abstract classes22.70%
▷ Concrete classes7297.30%
▷ Final classes00.00%
Methods308
▷ Static methods8226.62%
▷ Public methods30799.68%
▷ Protected methods00.00%
▷ Private methods10.32%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/default.png28.71KB21.33KB▼ 25.71%
dist/assets/img/default.png28.71KB21.33KB▼ 25.71%
admin/framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/img/icon.png1.83KB1.27KB▼ 30.47%