72% movie-discovery

Code Review | Movie Discovery

WordPress plugin Movie Discovery scored72%from 54 tests.

About plugin

  • Plugin page: movie-discovery
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.0
  • WordPress version: 6.3.1
  • First release: Sep 9, 2014
  • Latest release: Sep 16, 2014
  • Number of updates: 7
  • Update frequency: every 1.1 days
  • Top authors: flymke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,294 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.59ms] Passed 4 tests

Server-side resources used by Movie Discovery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.38 ▲0.78
Dashboard /wp-admin3.36 ▲0.0648.59 ▼6.50
Posts /wp-admin/edit.php3.47 ▲0.1258.56 ▼6.21
Add New Post /wp-admin/post-new.php5.94 ▲0.0693.54 ▼10.41
Media Library /wp-admin/upload.php3.28 ▲0.0541.03 ▲3.66
Movie Discovery /wp-admin/options-general.php?page=movie-discovery3.2634.71

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Movie Discovery
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.78 ▼0.768.75 ▲6.9241.81 ▲3.08
Dashboard /wp-admin2,193 ▲195.54 ▼0.0684.89 ▼7.6938.73 ▲0.80
Posts /wp-admin/edit.php2,104 ▲41.98 ▲0.0239.60 ▼3.4237.93 ▼13.25
Add New Post /wp-admin/post-new.php1,529 ▲123.16 ▲0.15748.23 ▲62.1858.55 ▼0.68
Media Library /wp-admin/upload.php1,407 ▲44.25 ▲0.05107.56 ▲8.0645.77 ▼0.22
Movie Discovery /wp-admin/options-general.php?page=movie-discovery8632.0030.3130.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=movie-discovery
    • > 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=movie-discovery
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=movie-discovery
    • > 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
The following issues need your attention
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/movie-discovery/admin/views/admin.php
    • > /wp-content/plugins/movie-discovery/admin/views/ajax_data.php
    • > /wp-content/plugins/movie-discovery/admin/views/movie_selector.php
    • > /wp-content/plugins/movie-discovery/public/views/public.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: result in wp-content/plugins/movie-discovery/admin/views/ajax_data.php on line 27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Donate link: Invalid url: "-"
You can look at the official readme.txt

movie-discovery/movie-discovery.php 92% from 13 tests

The main file in "Movie Discovery" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 170 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected698 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP9209354490
CSS2252161
JavaScript38247

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.50
▷ Minimum class complexity6.00
▷ Maximum class complexity15.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods726.92%
▷ Public methods2180.77%
▷ Protected methods00.00%
▷ Private methods519.23%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/img/md-logo_270.png4.97KB2.61KB▼ 47.54%
admin/assets/img/md-icon.png1.80KB0.98KB▼ 45.25%