10% wpmovielibrary

Code Review | WPMovieLibrary

WordPress plugin WPMovieLibrary scored10%from 54 tests.

About plugin

  • Plugin page: wpmovielibrary
  • Plugin version: 2.1.4.8
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-6.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2014
  • Latest release: May 5, 2023
  • Number of updates: 93
  • Update frequency: every 34.8 days
  • Top authors: Askelon (88.17%)caercam (12.9%)

Code review

54 tests

User reviews

55 reviews

Install metrics

400+ active /65,299 total downloads

Benchmarks

Plugin footprint 57% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wpmovielibrary/includes/config/wpmoly-settings.php+1502
    Undefined variable: wpmoly_supported_languages

Server metrics [RAM: ▲4.05MB] [CPU: ▲407.85ms] 50% from 4 tests

This is a short check of server-side resources used by WPMovieLibrary
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 565.83ms on /wp-admin/admin.php?page=wpmovielibrary)
  • Extra CPU: Try to keep extra CPU usage under 200.00ms (currently 407.85ms on /wp-admin/admin.php?page=wpmovielibrary)
PageMemory (MB)CPU Time (ms)
Home /6.68 ▲3.2182.96 ▲41.51
Dashboard /wp-admin8.22 ▲4.88604.56 ▲540.06
Posts /wp-admin/edit.php7.98 ▲4.63589.58 ▲536.89
Add New Post /wp-admin/post-new.php9.72 ▲3.83642.74 ▲543.43
Media Library /wp-admin/upload.php7.75 ▲4.52551.94 ▲512.93
Actors /wp-admin/edit-tags.php?taxonomy=actor&post_type=movie7.74590.32
Update movies /wp-admin/admin.php?page=wpmovielibrary-update-movies7.75575.29
Add New /wp-admin/post-new.php?post_type=movie8.01702.19
Redux Framework /wp-admin/tools.php?page=redux-about7.72595.19
Settings /wp-admin/admin.php?page=wpmovielibrary-settings8.31774.53
Collections /wp-admin/edit-tags.php?taxonomy=collection&post_type=movie7.74569.13
Genres /wp-admin/edit-tags.php?taxonomy=genre&post_type=movie7.74580.86
All Movies /wp-admin/edit.php?post_type=movie7.88569.21
Add custom pages /wp-admin/admin.php?page=wpmovielibrary-add-custom-pages7.75569.90
Your library /wp-admin/admin.php?page=wpmovielibrary7.87565.83

Server storage [IO: ▲12.01MB] [DB: ▲0.09MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 864 new files
Database: no new tables, 17 new options
New WordPress options
widget_recent-posts
widget_wpmovielibrary-taxonomies-widget
wpmoly_settings
wpmoly_l10n_rewrite_rules
can_compress_scripts
_wpmoly_fresh_install
theysaidso_admin_options
wpmoly_l10n_rewrite
widget_wpmoly-statistics-widget
redux_version_upgraded_from
...

Browser metrics Passed 4 tests

Checking browser requirements for WPMovieLibrary
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,125 ▲36414.12 ▲0.196.83 ▲4.9743.73 ▲3.60
Dashboard /wp-admin2,383 ▲1805.05 ▼0.85108.42 ▼7.7344.91 ▲2.02
Posts /wp-admin/edit.php2,214 ▲1112.13 ▲0.0938.26 ▼13.6435.76 ▼10.84
Add New Post /wp-admin/post-new.php1,633 ▲10723.16 ▲5.59664.36 ▼41.8536.96 ▼17.97
Media Library /wp-admin/upload.php1,495 ▲954.27 ▲0.0396.58 ▼8.9444.51 ▼2.17
Actors /wp-admin/edit-tags.php?taxonomy=actor&post_type=movie1,3412.2028.0835.39
Update movies /wp-admin/admin.php?page=wpmovielibrary-update-movies1,0541.8926.3145.51
Add New /wp-admin/post-new.php?post_type=movie4,2727.61187.31181.44
Redux Framework /wp-admin/tools.php?page=redux-about1,1563.6774.1368.05
Settings /wp-admin/admin.php?page=wpmovielibrary-settings5,7542.9478.35104.37
Collections /wp-admin/edit-tags.php?taxonomy=collection&post_type=movie1,3692.2027.2032.53
Genres /wp-admin/edit-tags.php?taxonomy=genre&post_type=movie1,3382.2030.3136.10
All Movies /wp-admin/edit.php?post_type=movie1,3542.0835.6635.62
Add custom pages /wp-admin/admin.php?page=wpmovielibrary-add-custom-pages9622.2424.4929.47
Your library /wp-admin/admin.php?page=wpmovielibrary1,8942.3144.5164.78

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 14 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • redux_version_upgraded_from
    • widget_theysaidso_widget
    • widget_wpmovielibrary-details-widget
    • _wpmoly_fresh_install
    • wpmoly_l10n_rewrite_rules
    • widget_wpmovielibrary-taxonomies-widget
    • db_upgraded
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpmovielibrary-update-movies
    • > Warning in wp-content/plugins/wpmovielibrary/views/admin/update-movies.php+108
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/post-new.php?post_type=movie
    • > Notice in wp-content/plugins/wpmovielibrary/views/admin/metabox/panels/panel-preview.php+16
    Undefined index: runtime
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=movie
    • > Notice in wp-content/plugins/wpmovielibrary/includes/framework/redux/ReduxCore/inc/fields/select/field_select.php+111
    Undefined index: name_suffix
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=movie
    • > Notice in wp-content/plugins/wpmovielibrary/includes/framework/redux/ReduxCore/inc/fields/select/field_select.php+111
    Undefined index: class
    • > GET request to /wp-admin/admin.php?page=wpmovielibrary-settings
    • > Error in wp-includes/Requests/src/Exception/InvalidArgument.php+29
    Uncaught WpOrg\Requests\Exception\InvalidArgument: WpOrg\Requests\Cookie::__construct(): Argument #1 ($name) must be of type string, integer given in wp-includes/Requests/src/Exception/InvalidArgument.php:29
    Stack trace:
    #0 wp-includes/Requests/src/Cookie.php(84): WpOrg\Requests\Exception\InvalidArgument::create()
    #1 wp-includes/class-wp-http.php(472): WpOrg\Requests\Cookie->__construct()
    #2 wp-includes/class-wp-http.php(352): WP_Http::normalize_cookies()
    #3 wp-includes/http.php(150): WP_Http->request()
    #4 wp-content/plugins/wpmovielibrary/includes/framework/redux/ReduxCore/inc/class.p.php(230): wp_remote_request()
    #5 wp-includes/class-wp-hook.php(310): Redux_P->proxy()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.php(517): WP_Hook->do_action()
    #8 wp-admin/admin-ajax.php(188): do_ac
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=genre&post_type=movie
    • > request to
    • > Notice in wp-content/plugins/wpmovielibrary/includes/framework/redux/ReduxCore/inc/class.redux_helpers.php+69
    Undefined index: REMOTE_ADDR
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=genre&post_type=movie
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
  • 34× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wpmovielibrary/views/archives/archives.php
    • > /wp-content/plugins/wpmovielibrary/views/shortcodes/actors.php
    • > /wp-content/plugins/wpmovielibrary/views/movies/headbox/tabs.php
    • > /wp-content/plugins/wpmovielibrary/views/statistics-widget/statistics.php
    • > /wp-content/plugins/wpmovielibrary/views/shortcodes/movies.php
    • > /wp-content/plugins/wpmovielibrary/views/movies/movie-metadata.php
    • > /wp-content/plugins/wpmovielibrary/views/admin/dashboard-quickaction/quickaction.php
    • > /wp-content/plugins/wpmovielibrary/views/shortcodes/detail-icon.php
    • > /wp-content/plugins/wpmovielibrary/views/shortcodes/rating.php
    • > /wp-content/plugins/wpmovielibrary/views/shortcodes/genres.php
  • 321× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpmovielibrary/views/shortcodes/poster.php on line 16
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpmovielibrary/views/shortcodes/poster.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'WPMOLY_Widget' not found in wp-content/plugins/wpmovielibrary/includes/widgets/class-details-widget.php:19
    • > PHP Notice
      Undefined variable: headbox in wp-content/plugins/wpmovielibrary/views/movies/movie-headbox.php on line 15
    • > PHP Notice
      Undefined index: url in wp-content/plugins/wpmovielibrary/includes/framework/redux/ReduxCore/inc/p.php on line 151
    • > PHP Warning
      Use of undefined constant WPMOLY_VERSION - assumed 'WPMOLY_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/wpmovielibrary/views/admin/dashboard/dashboard.php on line 5
    • > PHP Notice
      Undefined variable: section in wp-content/plugins/wpmovielibrary/views/admin/settings/section-headers.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wpmovielibrary/views/admin/requirements-error.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WPMOLY_Module' not found in wp-content/plugins/wpmovielibrary/public/class-wpmoly-movies.php:16
    • > PHP Notice
      Undefined variable: style in wp-content/plugins/wpmovielibrary/views/statistics-widget/statistics.php on line 12

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wpmovielibrary-settings
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=wpmovielibrary-settings
    • > Network (severe)
    wp-admin/admin-ajax.php?action=redux_p&nonce=88cefeeeda&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D88cefeeeda%26url%3D - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=wpmovielibrary-settings
    • > Security (severe) in unknown
    /wp-admin/admin.php?page=wpmovielibrary-settings - Refused to execute script from '/wp-admin/admin-ajax.php?action=redux_p&nonce=88cefeeeda&url=http%3A%2F%2Flook.redux.io%2Fapi%2Findex.php%3Fjs%26g%261%26v%3D2&proxy=http%3A%2F%2Fwp.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dredux_p%26nonce%3D88cefeeeda%26url%3D' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

wpmovielibrary/wpmovielibrary.php Passed 13 tests

The primary PHP file in "WPMovieLibrary" version 2.1.4.8 is used by WordPress to initiate all plugin functionality
59 characters long description:
A WordPress Plugin to manage a personnal library of movies.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin86,866 lines of code in 632 files:
LanguageFilesBlank linesComment linesLines of code
PHP2739,57214,29036,922
JavaScript1893,9663,39418,427
PO File74,2245,32110,417
Sass571,363778,890
CSS679821315,582
LESS303942024,100
SVG3001,406
JSON21840945
Markdown3610122
Bourne Shell124055

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 113)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity36.48
▷ Minimum class complexity1.00
▷ Maximum class complexity880.00
Average method complexity5.16
▷ Minimum method complexity1.00
▷ Maximum method complexity113.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes174
▷ Abstract classes31.72%
▷ Concrete classes17198.28%
▷ Final classes00.00%
Methods1,488
▷ Static methods40327.08%
▷ Public methods1,06971.84%
▷ Protected methods30520.50%
▷ Private methods1147.66%
Functions76
▷ Named functions5268.42%
▷ Anonymous functions2431.58%
Constants74
▷ Global constants1216.22%
▷ Class constants6283.78%
▷ Public constants62100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
72 PNG files occupy 0.23MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/framework/redux/ReduxCore/assets/img/2-col-portfolio.png1.02KB0.15KB▼ 85.07%
assets/img/legacy/icon-enqueue.png0.49KB0.44KB▼ 11.26%
includes/framework/redux/ReduxCore/assets/img/3cl.png3.08KB0.33KB▼ 89.13%
assets/img/legacy/icon-draft.png0.40KB0.37KB▼ 8.09%
includes/framework/redux/ReduxCore/assets/img/3cm.png2.96KB0.29KB▼ 90.35%