84% my-movie-database

Code Review | My Movie Database

WordPress plugin My Movie Database scored84%from 54 tests.

About plugin

  • Plugin page: my-movie-database
  • Plugin version: 3.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2017
  • Latest release: May 20, 2023
  • Number of updates: 28
  • Update frequency: every 71.7 days
  • Top authors: djleven (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /20,295 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.53MB] [CPU: ▼5.42ms] Passed 4 tests

An overview of server-side resources used by My Movie Database
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5340.87 ▼1.88
Dashboard /wp-admin3.87 ▲0.4851.24 ▼15.17
Posts /wp-admin/edit.php3.99 ▲0.6057.25 ▲4.74
Add New Post /wp-admin/post-new.php6.92 ▲0.99121.88 ▼9.36
Media Library /wp-admin/upload.php3.79 ▲0.5247.86 ▲11.97
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=person3.7840.53
Add New /wp-admin/post-new.php?post_type=tvshow6.92101.89
Movies /wp-admin/edit.php?post_type=movie3.8643.95
Add New /wp-admin/post-new.php?post_type=person6.9290.32
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=movie3.7941.48
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=person3.7940.55
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=movie3.8039.86
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=tvshow3.7938.49
Add New /wp-admin/post-new.php?post_type=movie6.9295.44
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=tvshow3.8042.28

Server storage [IO: ▲0.82MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 84 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
category_children
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by My Movie Database
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,923 ▲16214.74 ▲0.461.71 ▼0.4242.40 ▼0.73
Dashboard /wp-admin2,323 ▲1545.66 ▲0.0891.37 ▼10.9242.04 ▼1.09
Posts /wp-admin/edit.php2,225 ▲1252.04 ▲0.0739.70 ▼2.8536.86 ▲3.07
Add New Post /wp-admin/post-new.php1,630 ▲10223.10 ▼0.08667.18 ▲1.3262.27 ▲12.53
Media Library /wp-admin/upload.php1,525 ▲1254.27 ▲0.0796.37 ▼13.6043.66 ▼2.34
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=person1,5832.1929.9036.07
Add New /wp-admin/post-new.php?post_type=tvshow6,36522.531,166.1346.20
Movies /wp-admin/edit.php?post_type=movie1,2941.9934.2033.86
Add New /wp-admin/post-new.php?post_type=person6,36622.11971.9338.13
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=movie1,4442.1726.9531.41
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=person1,4412.1629.0530.29
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=movie1,5832.2029.0730.90
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=tvshow1,4472.1927.8331.22
Add New /wp-admin/post-new.php?post_type=movie1,69919.17907.6541.42
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=tvshow1,5832.2028.9834.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • category_children

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 20× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'MyMovieDatabase\\ActionHookSubscriberInterface' not found in wp-content/plugins/my-movie-database/core/admin/Settings.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'MyMovieDatabase\\ActionHookSubscriberInterface' not found in wp-content/plugins/my-movie-database/core/controllers/PublicController.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'MyMovieDatabase\\Lib\\PostTypes\\PostTypeEntityAbstract' not found in wp-content/plugins/my-movie-database/core/lib/wpPostTypes/PostType.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'MyMovieDatabase\\Lib\\ResourceTypes\\AbstractResourceType' not found in wp-content/plugins/my-movie-database/core/lib/resourceTypes/TvshowResourceType.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'MyMovieDatabase\\ActionHookSubscriberInterface' not found in wp-content/plugins/my-movie-database/core/admin/SettingsCacheController.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'MyMovieDatabase\\ActionHookSubscriberInterface' not found in wp-content/plugins/my-movie-database/core/lib/LanguageManager.php:66
    • > PHP Fatal error
      Uncaught Error: Class 'MyMovieDatabase\\Lib\\WpContentTypes\\WpAbstractContentType' not found in wp-content/plugins/my-movie-database/core/lib/wpContentTypes/WpShortcodeContentType.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'MyMovieDatabase\\ActionHookSubscriberInterface' not found in wp-content/plugins/my-movie-database/core/lib/resourceAPI/AbstractEndpoint.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'MyMovieDatabase\\Lib\\ResourceAPI\\AbstractEndpoint' not found in wp-content/plugins/my-movie-database/core/lib/resourceAPI/GetResourcesEndpoint.php:22
    • > PHP Fatal error
      Trait 'MyMovieDatabase\\Lib\\WpContentTypes\\TemplateVueTrait' not found in wp-content/plugins/my-movie-database/core/lib/wpContentTypes/WpAbstractContentType.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
10 plugin tags: tv show, movie, tmdb, tv, television...

my-movie-database/my_movie_database.php 85% from 13 tests

The main PHP script in "My Movie Database" version 3.0.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("my-movie-database.php" instead of "my_movie_database.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 364 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin6,771 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP387832,6472,876
PO File81,0801,3602,285
JSON8001,009
CSS27940445
JavaScript4522156

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.25
Average class complexity6.84
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces7
Interfaces4
Traits2
Classes32
▷ Abstract classes412.50%
▷ Concrete classes2887.50%
▷ Final classes00.00%
Methods254
▷ Static methods228.66%
▷ Public methods17368.11%
▷ Protected methods4517.72%
▷ Private methods3614.17%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants92
▷ Global constants33.26%
▷ Class constants8996.74%
▷ Public constants89100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/app/img/mmdb-placeholder-342.png16.60KB4.23KB▼ 74.52%
assets/js/app/img/mmdb-placeholder-154.png11.13KB2.54KB▼ 77.18%
assets/js/app/img/mmdb-placeholder-132.png11.03KB1.88KB▼ 82.93%
assets/js/app/img/mmdb-placeholder-300.png11.72KB4.06KB▼ 65.33%
assets/img/icon-256x256.png24.89KB9.71KB▼ 61.01%