10% movie-data-from-rt

Code Review | Movie Data from RT

WordPress plugin Movie Data from RT scored10%from 54 tests.

About plugin

  • Plugin page: movie-data-from-rt
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: Mar 7, 2016
  • Number of updates: 22
  • Update frequency: every 1.1 days
  • Top authors: creativecreate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,589 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/movie-data-from-rt/rt-moviedata.php+26
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.90MB] [CPU: ▼59.37ms] Passed 4 tests

Server-side resources used by Movie Data from RT
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.375.34 ▼49.08
Dashboard /wp-admin2.11 ▼1.197.08 ▼49.75
Posts /wp-admin/edit.php2.11 ▼1.257.04 ▼45.22
Add New Post /wp-admin/post-new.php2.11 ▼3.785.99 ▼93.42
Media Library /wp-admin/upload.php2.11 ▼1.127.22 ▼28.54

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_rt_moviedata_cc
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Movie Data from RT
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲1914.29 ▼0.142.30 ▲0.2342.61 ▼0.99
Dashboard /wp-admin2,207 ▲395.62 ▼0.0198.39 ▼3.0641.01 ▼2.53
Posts /wp-admin/edit.php2,112 ▲122.00 ▲0.0339.14 ▲1.4735.27 ▼3.64
Add New Post /wp-admin/post-new.php1,538 ▲123.40 ▲4.99663.88 ▲23.3952.99 ▼30.67
Media Library /wp-admin/upload.php1,415 ▲184.14 ▼0.07101.46 ▼5.2041.01 ▼7.35

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/movie-data-from-rt/rt-moviedata.php+26
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_rt_moviedata_cc
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-widget.php
    • > /wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-page.php
  • 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: rtmdcc_options in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-page.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/movie-data-from-rt/rt-moviedata.php:25
    • > PHP Notice
      Undefined variable: rtmdcc_options in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-widget.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-page.php on line 3
    • > PHP Notice
      Undefined variable: rtmdcc_options in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-page.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-widget.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-widget.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-widget-settings.php:2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-page.php on line 2
    • > PHP Notice
      Undefined variable: rtmdcc_options in wp-content/plugins/movie-data-from-rt/inc/rt-moviedata-page.php on line 36

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin Dashboard), #2 (Widget Settings), #3 (Widget display: 1 Col | 2 Cols | 3 Cols), #4 (In Post/Page view (shortcode)), #5 (In Post/Page view (shortcode with options))
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

movie-data-from-rt/rt-moviedata.php 85% from 13 tests

The principal PHP file in "Movie Data from RT" v. 1.0.4 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("movie-data-from-rt.php" instead of "rt-moviedata.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin495 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP64764405
CSS181460
JavaScript261530

PHP code Passed 2 tests

A short review 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.39
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.76MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png244.16KB86.49KB▼ 64.57%
screenshot-3.png273.49KB101.28KB▼ 62.97%
screenshot-2.png24.47KB10.88KB▼ 55.55%
screenshot-5.png92.76KB30.56KB▼ 67.05%
screenshot-4.png141.27KB53.16KB▼ 62.37%