10% remote-image-gallery-import

Code Review | Image Gallery Import

WordPress plugin Image Gallery Import scored10%from 54 tests.

About plugin

  • Plugin page: remote-image-gall...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Oct 24, 2013
  • Latest release: May 20, 2014
  • Number of updates: 3
  • Update frequency: every 69.7 days
  • Top authors: wptrack (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

40+ active /3,160 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
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/remote-image-gallery-import/image-leech.php+350
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼53.53ms] Passed 4 tests

This is a short check of server-side resources used by Image Gallery Import
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.338.62 ▼32.22
Dashboard /wp-admin2.16 ▼1.156.85 ▼41.64
Posts /wp-admin/edit.php2.16 ▼1.206.00 ▼42.26
Add New Post /wp-admin/post-new.php2.16 ▼3.738.26 ▼97.98
Media Library /wp-admin/upload.php2.16 ▼1.075.90 ▼30.16
Import Gallery /wp-admin/upload.php?page=remote-image-gallery-import/image-leech.php2.166.45

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Image Gallery Import
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.33 ▼0.021.97 ▲0.0541.77 ▼2.08
Dashboard /wp-admin2,199 ▲195.64 ▼0.0198.35 ▲9.2044.93 ▲3.48
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0438.90 ▼1.3835.03 ▼5.03
Add New Post /wp-admin/post-new.php1,531 ▲323.17 ▲0.13672.79 ▲37.0068.88 ▲4.24
Media Library /wp-admin/upload.php1,404 ▲74.23 ▲0.01107.96 ▲7.9846.61 ▲2.81
Import Gallery /wp-admin/upload.php?page=remote-image-gallery-import/image-leech.php9732.1628.6927.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/remote-image-gallery-import/image-leech.php+350
    Array and string offset access syntax with curly braces is deprecated
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/upload.php?page=remote-image-gallery-import/image-leech.php
    • > Deprecated in wp-content/plugins/remote-image-gallery-import/image-leech.php+350
    Array and string offset access syntax with curly braces is deprecated
    • > GET request to /wp-admin/upload.php?page=remote-image-gallery-import/image-leech.php
    • > User deprecated in wp-includes/functions.php+5643
    File admin-functions.php is deprecated since version 2.5.0! Use wp-admin/includes/admin.php instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/upload.php?page=remote-image-gallery-import/image-leech.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-includes/pluggable.php): failed to open stream: No such file or directory in wp-content/plugins/remote-image-gallery-import/image-leech.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/remote-image-gallery-import/image-leech.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/remote-image-gallery-import/image-leech.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === remote-image-gallery-import === )
The official readme.txt is a good inspiration

remote-image-gallery-import/image-leech.php 85% from 13 tests

The primary PHP file in "Image Gallery Import" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 431 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("remote-image-gallery-import.php" instead of "image-leech.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin411 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP116934411

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected