83% movie-widget

Code Review | Movie Widget

WordPress plugin Movie Widget scored83%from 54 tests.

About plugin

  • Plugin page: movie-widget
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 6.3.1
  • First release: Sep 7, 2018
  • Latest release: Apr 18, 2021
  • Number of updates: 19
  • Update frequency: every 253.5 days
  • Top authors: jason123line (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /5,585 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.73ms] Passed 4 tests

A check of server-side resources used by Movie Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.10 ▼0.54
Dashboard /wp-admin3.36 ▲0.0652.97 ▲0.07
Posts /wp-admin/edit.php3.41 ▲0.0651.38 ▼0.74
Add New Post /wp-admin/post-new.php5.94 ▲0.0687.48 ▼17.72
Media Library /wp-admin/upload.php3.28 ▲0.0640.26 ▲2.93

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_movieposterdisplay_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Movie Widget: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲6213.90 ▼0.395.40 ▲3.5440.52 ▲1.73
Dashboard /wp-admin2,221 ▲245.81 ▼0.07114.42 ▲4.6743.88 ▼4.31
Posts /wp-admin/edit.php2,060 ▼402.01 ▼0.0043.53 ▼1.8235.75 ▼5.30
Add New Post /wp-admin/post-new.php1,546 ▼222.79 ▼0.63594.84 ▼46.6161.67 ▲11.72
Media Library /wp-admin/upload.php1,403 ▼04.24 ▼0.02112.19 ▲12.1551.72 ▲5.68

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_movieposterdisplay_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/movie-widget/includes/movieposterdisplay-class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/movie-widget/includes/movieposterdisplay-scripts.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: overview, widget, posters, trailers, movie

movie-widget/movieposterdisplay.php 85% from 13 tests

"Movie Widget" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("movie-widget.php" instead of "movieposterdisplay.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
There were no executable files found in this plugin300 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP39579287
CSS11013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity41.00
▷ Minimum class complexity41.00
▷ Maximum class complexity41.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 1.72MB with 1.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png1,373.32KB423.73KB▼ 69.15%
assets/icon-256x256.png21.36KB7.42KB▼ 65.28%
assets/banner-772x250.png359.47KB113.85KB▼ 68.33%
assets/icon-128x128.png10.47KB4.25KB▼ 59.43%