84% easy-image-display

Code Review | Easy Image Display

WordPress plugin Easy Image Display scored84%from 54 tests.

About plugin

  • Plugin page: easy-image-display
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.3
  • WordPress version: 6.3.1
  • First release: Oct 10, 2013
  • Latest release: Jun 7, 2018
  • Number of updates: 22
  • Update frequency: every 77.3 days
  • Top authors: Shellbot (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

800+ active /21,797 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼11.53ms] Passed 4 tests

This is a short check of server-side resources used by Easy Image Display
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1049.50 ▲2.05
Dashboard /wp-admin3.39 ▲0.0550.50 ▼22.69
Posts /wp-admin/edit.php3.51 ▲0.1554.37 ▲0.70
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.90 ▼24.88
Media Library /wp-admin/upload.php3.32 ▲0.0940.67 ▲0.76

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Easy Image Display
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲14113.89 ▼0.3611.50 ▲9.5141.57 ▼3.32
Dashboard /wp-admin2,200 ▲205.51 ▼0.0884.40 ▼21.3341.40 ▼3.33
Posts /wp-admin/edit.php2,111 ▲111.97 ▼0.0243.50 ▲5.4038.16 ▲2.91
Add New Post /wp-admin/post-new.php1,536 ▲823.11 ▼0.12636.60 ▼49.5261.48 ▲8.53
Media Library /wp-admin/upload.php1,411 ▲114.23 ▲0.0699.64 ▼18.5945.39 ▼3.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_sb-easy-image-widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-image-display/sb-easy-image-display.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-image-display/sb-easy-image-widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
4 plugin tags: random image, latest image, image, gallery

easy-image-display/sb-easy-image-display.php 92% from 13 tests

The main file in "Easy Image Display" v. 1.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-image-display.php" instead of "sb-easy-image-display.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin557 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP216372508
CSS151648
JavaScript1061

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity24.00
▷ Minimum class complexity12.00
▷ Maximum class complexity36.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.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 Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/overlay.png0.18KB0.15KB▼ 15.93%
images/loading_background.png0.15KB0.15KB▼ 0.64%
images/border.png0.11KB0.10KB▼ 7.14%
images/controls.png2.83KB1.28KB▼ 54.82%