72% direct-publisher-for-roku

Code Review | Roku Direct Publisher

WordPress plugin Roku Direct Publisher scored72%from 54 tests.

About plugin

  • Plugin page: direct-publisher-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8
  • WordPress version: 6.3.1
  • First release: May 18, 2018
  • Latest release: Jun 10, 2018
  • Number of updates: 9
  • Update frequency: every 2.6 days
  • Top authors: heyjones (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,783 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: ▲1.65MB] [CPU: ▲45.27ms] Passed 4 tests

Analyzing server-side resources used by Roku Direct Publisher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.96 ▲1.4995.85 ▲58.72
Dashboard /wp-admin5.03 ▲1.6990.60 ▲33.45
Posts /wp-admin/edit.php5.09 ▲1.7396.52 ▲51.93
Add New Post /wp-admin/post-new.php7.61 ▲1.72128.49 ▲37.01
Media Library /wp-admin/upload.php4.91 ▲1.6893.35 ▲58.68
Categories /wp-admin/edit-tags.php?taxonomy=roku_category&post_type=roku_video5.0486.08
All Videos /wp-admin/edit.php?post_type=roku_video5.0079.69
Settings /wp-admin/edit.php?post_type=roku_video&page=roku_direct_publisher4.8474.87
Add New /wp-admin/post-new.php?post_type=roku_video5.15101.62
Genres /wp-admin/edit-tags.php?taxonomy=roku_genre&post_type=roku_video4.9291.32
Tags /wp-admin/edit-tags.php?taxonomy=roku_tag&post_type=roku_video4.9083.28

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 143 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
roku_genre_children
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Roku Direct Publisher
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲10614.35 ▲0.001.74 ▲0.2543.45 ▲3.74
Dashboard /wp-admin2,255 ▲775.63 ▼0.0495.05 ▼2.5847.65 ▲2.28
Posts /wp-admin/edit.php2,160 ▲602.00 ▼0.0439.09 ▲3.4737.39 ▼0.42
Add New Post /wp-admin/post-new.php6,690 ▲5,16226.01 ▲2.821,038.74 ▲398.0541.36 ▼9.50
Media Library /wp-admin/upload.php1,463 ▲664.21 ▲0.0195.15 ▼2.5044.80 ▼1.05
Categories /wp-admin/edit-tags.php?taxonomy=roku_category&post_type=roku_video2,0607.39171.8737.86
All Videos /wp-admin/edit.php?post_type=roku_video1,1481.9931.0430.53
Settings /wp-admin/edit.php?post_type=roku_video&page=roku_direct_publisher9152.0424.9026.74
Add New /wp-admin/post-new.php?post_type=roku_video3,1098.05164.2742.62
Genres /wp-admin/edit-tags.php?taxonomy=roku_genre&post_type=roku_video2,5202.1729.2937.92
Tags /wp-admin/edit-tags.php?taxonomy=roku_tag&post_type=roku_video1,3072.1627.3829.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • roku_genre_children
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=roku_video&page=roku_direct_publisher
    • > Notice in wp-content/plugins/direct-publisher-for-roku/lib/settings.php+54
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/direct-publisher-for-roku/roku-direct-publisher.php
  • 52× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/direct-publisher-for-roku/vendor/advanced-custom-fields/core/controllers/third_party.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function roku_direct_publisher\\feed\\add_action() in wp-content/plugins/direct-publisher-for-roku/lib/feed.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/direct-publisher-for-roku/vendor/advanced-custom-fields/core/controllers/export.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function roku_direct_publisher\\format\\add_action() in wp-content/plugins/direct-publisher-for-roku/taxonomies/format.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/direct-publisher-for-roku/vendor/advanced-custom-fields/core/controllers/input.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/direct-publisher-for-roku/vendor/advanced-custom-fields/core/controllers/addons.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function roku_direct_publisher\\rating\\add_action() in wp-content/plugins/direct-publisher-for-roku/taxonomies/rating.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/direct-publisher-for-roku/vendor/advanced-custom-fields/core/controllers/revisions.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/direct-publisher-for-roku/vendor/advanced-custom-fields/core/fields/file.php:3
    • > PHP Warning
      include_once(ROKU_DIRECT_PUBLISHER_DIRvendor/advanced-custom-fields/acf.php): failed to open stream: No such file or directory in wp-content/plugins/direct-publisher-for-roku/lib/acf.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: roku, video, streaming, direct publisher

direct-publisher-for-roku/roku-direct-publisher.php 92% from 13 tests

The main file in "Roku Direct Publisher" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("direct-publisher-for-roku.php" instead of "roku-direct-publisher.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected37,801 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PO File249,70114,11221,302
PHP534,1484,68710,040
JavaScript62,1201,5924,139
CSS56853792,320

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.44
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces10
Interfaces0
Traits0
Classes39
▷ Abstract classes00.00%
▷ Concrete classes39100.00%
▷ Final classes00.00%
Methods278
▷ Static methods00.00%
▷ Public methods278100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions71
▷ Named functions71100.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
17 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
vendor/advanced-custom-fields/core/fields/date_picker/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
vendor/advanced-custom-fields/core/fields/date_picker/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%