58% movie-database

Code Review | Movie Database

WordPress plugin Movie Database scored58%from 54 tests.

About plugin

  • Plugin page: movie-database
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.4
  • WordPress version: 6.3.1
  • First release: Apr 20, 2014
  • Latest release: Nov 8, 2019
  • Number of updates: 57
  • Update frequency: every 35.6 days
  • Top authors: Psynoxis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /8,902 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼34.10ms] Passed 4 tests

This is a short check of server-side resources used by Movie Database
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1443.69 ▲0.89
Dashboard /wp-admin3.12 ▼0.1923.48 ▼33.15
Posts /wp-admin/edit.php3.12 ▼0.2423.54 ▼24.39
Add New Post /wp-admin/post-new.php3.12 ▼2.7722.85 ▼67.88
Media Library /wp-admin/upload.php3.12 ▼0.1122.96 ▼10.98
Wishlist /wp-admin/admin.php?page=movdb_reservations_page3.1222.04
Screenings /wp-admin/admin.php?page=movdb_screenings_page3.1223.07
Movies /wp-admin/index.php?page=movdb_main_page3.1222.60
Movies /wp-admin/admin.php?page=movdb_movies_page3.1225.04
Sources /wp-admin/admin.php?page=movdb_sources_page3.1219.44
Survey /wp-admin/admin.php?page=movdb_main_page3.1223.20
Views /wp-admin/admin.php?page=movdb_views_page3.1223.13

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: 4 new tables, 8 new options
New tables
wp_movdb_sources
wp_movdb_reservations
wp_movdb_screenings
wp_movdb_movies
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
movdb_db_version
widget_movdb_widget
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Movie Database
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,045 ▲28813.72 ▼0.665.95 ▲3.8946.59 ▲0.30
Dashboard /wp-admin2,349 ▲1585.00 ▲0.09104.05 ▼4.4742.92 ▼0.02
Posts /wp-admin/edit.php2,143 ▲512.07 ▲0.0635.18 ▼0.9533.80 ▼2.26
Add New Post /wp-admin/post-new.php1,559 ▲2623.27 ▲0.07669.30 ▲5.3957.68 ▲5.26
Media Library /wp-admin/upload.php1,445 ▲574.28 ▲0.05100.14 ▼2.4243.95 ▲0.47
Wishlist /wp-admin/admin.php?page=movdb_reservations_page1,1721.7626.5827.06
Screenings /wp-admin/admin.php?page=movdb_screenings_page1,1831.7726.3832.61
Movies /wp-admin/index.php?page=movdb_main_page1,3191.9430.5941.23
Movies /wp-admin/admin.php?page=movdb_movies_page1,2221.7826.0730.44
Sources /wp-admin/admin.php?page=movdb_sources_page1,2771.9125.9330.05
Survey /wp-admin/admin.php?page=movdb_main_page1,3381.9430.6733.78
Views /wp-admin/admin.php?page=movdb_views_page1,1411.8026.8229.45

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie tables were found after uninstall: 4 tables
    • wp_movdb_movies
    • wp_movdb_screenings
    • wp_movdb_reservations
    • wp_movdb_sources
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_movdb_widget
    • movdb_db_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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)
Please fix the following server-side errors
  • 111 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=movdb_views_page
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=movdb_sources_page
    • > Notice in wp-content/plugins/movie-database/sources-page.php+5
    Undefined index: action

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
The following issues need your attention
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/movie-database/class/MovDB_SuggestionsBest_List_Table.class.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/movie-database/class/MovDB_Reservations_List_Table.class.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/movie-database/class/MovDB_SuggestionsNotSeen_List_Table.class.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/movie-database/class/MovDB_DeletableSources_List_Table.class.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/movie-database/class/MovDB_DeletableSources_List_Table.class.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'MovDB_View' not found in wp-content/plugins/movie-database/class/MovDB_SeenUnrated_View.class.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/movie-database/class/MovDB_Screenings_List_Table.class.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'MovDB_View' not found in wp-content/plugins/movie-database/class/MovDB_LastScreenings_View.class.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/movie-database/class/MovDB_SuggestionsBest_List_Table.class.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/movie-database/class/MovDB_DeletableSources_List_Table.class.php on line 4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: movies, home cinema, movie theater, cinema, movie database...

movie-database/movie-database.php Passed 13 tests

"Movie Database" version 1.0.11's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
132 characters long description:
Adds a movie database to WordPress. You can manage your movie collection and show everyone, which movies you were watching recently.

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
Success! There were no dangerous files found in this plugin5,210 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP209151,3803,904
PO File2286448664
JavaScript21003360
CSS2797282

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity21.08
▷ Minimum class complexity4.00
▷ Maximum class complexity44.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods167
▷ Static methods00.00%
▷ Public methods167100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions57
▷ Named functions57100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon-3d.png0.43KB0.38KB▼ 12.36%