79% podiant

Code Review | Podiant

WordPress plugin Podiant scored79%from 54 tests.

About plugin

  • Plugin page: podiant
  • Plugin version: 1.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.4
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Jan 13, 2021
  • Number of updates: 14
  • Update frequency: every 15.9 days
  • Top authors: amarksteadman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /310 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.71MB] [CPU: ▲4.04ms] Passed 4 tests

This is a short check of server-side resources used by Podiant
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.7444.53 ▲2.58
Dashboard /wp-admin4.01 ▲0.7154.43 ▼1.80
Posts /wp-admin/edit.php4.06 ▲0.7054.06 ▲6.80
Add New Post /wp-admin/post-new.php6.61 ▲0.72104.23 ▲15.13
Media Library /wp-admin/upload.php3.93 ▲0.7040.59 ▲8.56
All Episodes /wp-admin/edit.php?post_type=episode3.9845.83
Settings /wp-admin/edit.php?post_type=episode&page=settings3.9136.40

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Podiant
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲22113.64 ▼0.737.75 ▲5.9339.23 ▼12.74
Dashboard /wp-admin2,256 ▲684.83 ▼0.0599.17 ▼15.8183.78 ▲37.50
Posts /wp-admin/edit.php2,137 ▲482.01 ▼0.0338.66 ▲2.9532.06 ▼2.92
Add New Post /wp-admin/post-new.php6,409 ▲4,89528.08 ▲10.66925.01 ▲243.2733.83 ▼23.24
Media Library /wp-admin/upload.php1,441 ▲534.20 ▼0.0296.91 ▼2.0277.17 ▲32.10
All Episodes /wp-admin/edit.php?post_type=episode1,1551.9532.7126.46
Settings /wp-admin/edit.php?post_type=episode&page=settings9672.0326.7026.74

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: 8 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_podiant_player_widget
    • widget_podiant_latest_episode_player_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/podiant/admin/views/notice.php
    • > /wp-content/plugins/podiant/admin/views/tabs.php
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/podiant/admin/views/tabs.php on line 2
    • > PHP Notice
      Undefined variable: kind in wp-content/plugins/podiant/admin/views/notice.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/podiant/admin/views/tabs.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/podiant/admin/views/sync_disabled.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Background_Process' not found in wp-content/plugins/podiant/includes/class-podiant-action-queue.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/podiant/includes/class-podiant-player-widget.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/podiant/admin/views/permalinks.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/media.php' (include_path='.:/usr/share/php') in wp-content/plugins/podiant/includes/class-podiant-download.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/podiant/admin/views/display.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/podiant/includes/class-podiant-download.php on line 12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: podcasting

podiant/podiant.php Passed 13 tests

"Podiant" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
54 characters long description:
Sync your Podiant podcasts with your WordPress website

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
Success! There were no dangerous files found in this plugin3,609 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,0472,2153,587
JavaScript322813
CSS1209

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity20.07
▷ Minimum class complexity1.00
▷ Maximum class complexity230.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes27.41%
▷ Concrete classes2592.59%
▷ Final classes00.00%
Methods208
▷ Static methods157.21%
▷ Public methods11253.85%
▷ Protected methods8138.94%
▷ Private methods157.21%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants18
▷ Global constants1794.44%
▷ Class constants15.56%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png1.63KB1.64KB0.00%