10% screen9-video-integration

Code Review | Screen9 Video Integration

WordPress plugin Screen9 Video Integration scored10%from 54 tests.

About plugin

  • Plugin page: screen9-video-int...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jul 10, 2013
  • Latest release: Jul 10, 2013
  • Number of updates: 15
  • Update frequency: every 0.5 days
  • Top authors: olalidmark (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /731 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/screen9-video-integration/screen9_video_list_widget.php+71
    Function create_function() is deprecated

Server metrics [RAM: ▼1.73MB] [CPU: ▼51.78ms] Passed 4 tests

Analyzing server-side resources used by Screen9 Video Integration
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.216.59 ▼31.16
Dashboard /wp-admin2.28 ▼1.036.95 ▼43.33
Posts /wp-admin/edit.php2.28 ▼1.087.06 ▼41.70
Add New Post /wp-admin/post-new.php2.28 ▼3.617.05 ▼90.92
Media Library /wp-admin/upload.php2.28 ▼0.957.46 ▼24.70
Settings Screen9 /wp-admin/options-general.php?page=screen9-settings2.289.20
Videos /wp-admin/edit.php?post_type=screen9_video2.288.03
Create new /wp-admin/post-new.php?post_type=screen9_video2.288.12

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
widget_screen9videowidget
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Screen9 Video Integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.35 ▼0.181.61 ▼0.0241.13 ▼2.95
Dashboard /wp-admin2,230 ▲505.59 ▼0.0184.83 ▼6.2554.02 ▲15.16
Posts /wp-admin/edit.php2,135 ▲352.07 ▲0.1339.44 ▲1.0233.36 ▼5.94
Add New Post /wp-admin/post-new.php6,261 ▲4,72425.98 ▲7.80998.94 ▲383.3359.99 ▼12.87
Media Library /wp-admin/upload.php1,435 ▲354.23 ▲0.00107.09 ▲6.6671.17 ▲24.50
Settings Screen9 /wp-admin/options-general.php?page=screen9-settings8401.6728.9129.93
Videos /wp-admin/edit.php?post_type=screen9_video1,1051.9833.0328.21
Create new /wp-admin/post-new.php?post_type=screen9_video1,5832.5454.3166.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/screen9-video-integration/screen9_video_list_widget.php+71
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_screen9videowidget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Deprecated in wp-content/plugins/screen9-video-integration/screen9_video_list_widget.php+71
    Function create_function() is deprecated
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Screen9VideoWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=screen9-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=screen9-settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Notice in wp-content/plugins/screen9-video-integration/screen9_article_meta_box.php+32
    Undefined index: post_ID
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Notice in wp-content/plugins/screen9-video-integration/screen9_article_meta_box.php+33
    Undefined index: screen9_videoid
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > User notice in wp-includes/functions.php+5905
    Function WP_Object_Cache::get was called incorrectly. Cache key must be an integer or a non-empty string, NULL given. Please see Debugging in WordPress for more information. (This message was added in version 6.1.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Notice in wp-includes/IXR/class-IXR-client.php+33
    Undefined index: host
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Warning in wp-includes/IXR/class-IXR-client.php+96
    fsockopen(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Warning in wp-includes/IXR/class-IXR-client.php+96
    fsockopen(): unable to connect to :80 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Warning in wp-content/plugins/screen9-video-integration/screen9.php+90
    Illegal string offset 'mediaid'
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Warning in wp-content/plugins/screen9-video-integration/screen9.php+90
    Illegal string offset 'url'
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Warning in wp-content/plugins/screen9-video-integration/screen9.php+123
    Illegal string offset 'auth'
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Notice in wp-content/plugins/screen9-video-integration/screen9.php+155
    Undefined variable: video_details
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Notice in wp-content/plugins/screen9-video-integration/screen9.php+155
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=screen9_video
    • > Warning in wp-content/plugins/screen9-video-integration/screen9_util.php+9
    Invalid argument supplied for foreach()

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
  • 11× 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 get_header() in wp-content/plugins/screen9-video-integration/archive-screen9_video.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/screen9-video-integration/single-screen9_video.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/screen9-video-integration/api.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/screen9-video-integration/screen9_article_meta_box.php:3
    • > PHP Warning
      require_once(ABSPATH/wp-includes/class-IXR.php): failed to open stream: No such file or directory in wp-content/plugins/screen9-video-integration/api.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-includes/class-IXR.php' (include_path='.:/usr/share/php') in wp-content/plugins/screen9-video-integration/api.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/screen9-video-integration/api.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/screen9-video-integration/screen9_video_list_widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/screen9-video-integration/screen9_admin.php:2
    • > PHP Warning
      require_once(ABSPATH/wp-includes/class-IXR.php): failed to open stream: No such file or directory in wp-content/plugins/screen9-video-integration/api.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: cms, video

screen9-video-integration/screen9.php 85% from 13 tests

This is the main PHP file of "Screen9 Video Integration" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("screen9-video-integration.php" instead of "screen9.php")
  • 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected662 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP810345544
PO File1263060
JavaScript112058

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/video.png3.08KB0.47KB▼ 84.77%