89% pj-imdb

Code Review | PJ IMDB

WordPress plugin PJ IMDB scored89%from 54 tests.

About plugin

  • Plugin page: pj-imdb
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: Aug 7, 2019
  • Number of updates: 17
  • Update frequency: every 55.6 days
  • Top authors: pamjad (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /7,897 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by PJ IMDB
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0646.54 ▼3.14
Dashboard /wp-admin3.35 ▲0.0552.28 ▼4.44
Posts /wp-admin/edit.php3.41 ▲0.0552.93 ▼6.34
Add New Post /wp-admin/post-new.php5.49 ▼0.4080.12 ▼27.65
Media Library /wp-admin/upload.php3.28 ▲0.0539.13 ▲2.29

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for PJ IMDB
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3114.28 ▼0.251.73 ▼0.0244.69 ▲2.63
Dashboard /wp-admin2,198 ▲215.55 ▼0.0990.16 ▼2.7038.32 ▼8.44
Posts /wp-admin/edit.php2,106 ▲31.99 ▲0.0139.86 ▲0.4434.85 ▼1.49
Add New Post /wp-admin/post-new.php6,424 ▲4,89327.68 ▲4.70924.82 ▲310.3066.87 ▲7.16
Media Library /wp-admin/upload.php1,397 ▼04.18 ▼0.07108.99 ▲0.8349.42 ▲3.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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 no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: boxoffice, imdb, movie, cinema, series

pj-imdb/pj-imdb.php 92% from 13 tests

This is the main PHP file of "PJ IMDB" version 2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected390 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP11213197
PO File35661166
CSS10026
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.53MB with 0.33MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png4.25KB2.25KB▼ 47.11%
screenshot-2.PNG298.66KB68.99KB▼ 76.90%
assets/search.png0.46KB0.27KB▼ 41.54%
screenshot-1.PNG244.08KB52.88KB▼ 78.34%