89% media-library-image-gallery

Code Review | Media Library Image Gallery

WordPress plugin Media Library Image Gallery scored89%from 54 tests.

About plugin

  • Plugin page: media-library-ima...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Nov 13, 2016
  • Latest release: Jun 26, 2019
  • Number of updates: 7
  • Update frequency: every 136.7 days
  • Top authors: derweili (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,299 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.32ms] Passed 4 tests

A check of server-side resources used by Media Library Image Gallery
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.42 ▲3.06
Dashboard /wp-admin3.32 ▼0.0346.31 ▼13.34
Posts /wp-admin/edit.php3.37 ▲0.0147.19 ▼3.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.52 ▼19.59
Media Library /wp-admin/upload.php3.24 ▲0.0133.64 ▼0.60

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Media Library Image Gallery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.061.51 ▼0.4037.84 ▼4.50
Dashboard /wp-admin2,203 ▲125.81 ▲0.95103.68 ▼1.0041.00 ▼0.61
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.1239.97 ▼1.0434.78 ▼1.22
Add New Post /wp-admin/post-new.php1,542 ▲918.04 ▼5.22628.26 ▲23.9559.84 ▲3.59
Media Library /wp-admin/upload.php1,391 ▲64.18 ▼0.0396.05 ▼6.6242.00 ▼4.18

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
The official readme.txt is a good inspiration

media-library-image-gallery/media-library-image-gallery.php 92% from 13 tests

The principal PHP file in "Media Library Image Gallery" v. 1.0.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin76 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1403447
Markdown117029

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin