88% latest-apple-movie-trailers

Code Review | Latest Apple Movie Trailers

WordPress plugin Latest Apple Movie Trailers scored 88% from 54 tests.

About plugin

  • Plugin page: latest-apple-movi...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.3
  • WordPress version: 5.8.1
  • First release: Aug 3, 2010
  • Latest release: Dec 5, 2012
  • Number of updates: 13
  • Update frequency: every 187.5 days
  • Top authors: sebd86 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 5,360 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼136.36ms] Passed 4 tests

A check of server-side resources used by Latest Apple Movie Trailers
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1541.92 ▲19.90
Dashboard /wp-admin3.09 ▲0.0463.86 ▲17.72
Posts /wp-admin/edit.php3.15 ▲0.0452.69 ▲8.20
Add New Post /wp-admin/post-new.php5.45 ▲0.0294.54 ▼573.10
Media Library /wp-admin/upload.php3.04 ▲0.0434.50 ▲1.74
Latest Apple Movie Trailers /wp-admin/options-general.php?page=latest-apple-movie-trailers/latest_apple_movie_trailers.php3.1932.27

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 3 new options
New WordPress options
lamt_poster_size
lamt_caption_position
lamt_display_many

Browser metrics Passed 4 tests

A check of browser resources used by Latest Apple Movie Trailers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,710 ▲11415.96 ▼0.0415.20 ▲1.5456.21 ▲7.32
Dashboard /wp-admin2,972 ▲385.96 ▲0.06154.52 ▲9.66151.48 ▲41.06
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0081.30 ▲13.6887.91 ▼6.24
Add New Post /wp-admin/post-new.php1,686 ▲8214.47 ▼4.40494.62 ▲68.31120.96 ▲11.74
Media Library /wp-admin/upload.php1,812 ▲25.03 ▼0.01165.07 ▲3.80132.97 ▲13.94
Latest Apple Movie Trailers /wp-admin/options-general.php?page=latest-apple-movie-trailers/latest_apple_movie_trailers.php1,3412.1053.5789.11

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=latest-apple-movie-trailers/latest_apple_movie_trailers.php
    • > User deprecated in wp-includes/functions.php+5401
    rss.php is deprecated since version 3.0.0! Use wp-includes/class-simplepie.php instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/latest-apple-movie-trailers/latest_apple_movie_trailers.php:35

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 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Latest Movie Trailers displaying from Apple.com), #2 (Plugin Settings Page)
Please take inspiration from this readme.txt

latest-apple-movie-trailers/latest_apple_movie_trailers.php 92% from 13 tests

The primary PHP file in "Latest Apple Movie Trailers" version 1.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("latest-apple-movie-trailers.php" instead of "latest_apple_movie_trailers.php")

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
Good job! No executable or dangerous file extensions detected199 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12051182
CSS10017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
6 PNG files occupy 0.10MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
support/dropbox.png5.19KB1.90KB▼ 63.49%
support/github.png4.15KB1.33KB▼ 67.98%
support/twitter.png4.92KB1.87KB▼ 62.12%
support/sebs-studio.png15.31KB6.10KB▼ 60.17%
support/facebook.png4.63KB1.86KB▼ 59.89%