10% advanced-image-grabber

Code Review | Advanced Image Grabber

WordPress plugin Advanced Image Grabber scored 10% from 54 tests.

About plugin

  • Plugin page: advanced-image-gr...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 5.9.2
  • First release: Jul 21, 2016
  • Latest release: Jul 21, 2016
  • Number of updates: 7
  • Update frequency: every 67.2 days
  • Top authors: chenyenming (57.14%)mansurahamed (57.14%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active / 3,667 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/advanced-image-grabber/advanced_image_grabber.php+12
    Use of undefined constant ADVANCED_IMAGE_GRABBER - assumed 'ADVANCED_IMAGE_GRABBER' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼2.51MB] [CPU: ▼344.72ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Image Grabber
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼1.654.40 ▼47.22
Dashboard /wp-admin1.88 ▼1.533.25 ▼29.50
Posts /wp-admin/edit.php1.89 ▼1.764.88 ▼31.60
Add New Post /wp-admin/post-new.php1.88 ▼5.093.85 ▼1,270.55
Media Library /wp-admin/upload.php1.88 ▼1.413.70 ▼21.06
Image Grabber /wp-admin/tools.php?page=advanced-image-grabber1.894.12

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Image Grabber
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4616.17 ▲0.516.12 ▲0.402.55 ▼0.09
Dashboard /wp-admin2,897 ▲366.09 ▼0.08119.80 ▼15.83156.04 ▼10.63
Posts /wp-admin/edit.php2,693 ▼13.23 ▼0.0061.83 ▼2.81136.70 ▼5.11
Add New Post /wp-admin/post-new.php1,664 ▼2616.47 ▼4.07415.37 ▼12.12156.12 ▼0.59
Media Library /wp-admin/upload.php1,703 ▲55.52 ▼0.05134.09 ▼1.07190.83 ▲3.69
Image Grabber /wp-admin/tools.php?page=advanced-image-grabber1,0182.3954.16113.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/advanced-image-grabber/advanced_image_grabber.php+12
    Use of undefined constant ADVANCED_IMAGE_GRABBER - assumed 'ADVANCED_IMAGE_GRABBER' (this will throw an Error in a future version of PHP)

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=advanced-image-grabber
    • > Warning in wp-content/plugins/advanced-image-grabber/advanced_image_grabber.php+12
    Use of undefined constant ADVANCED_IMAGE_GRABBER - assumed 'ADVANCED_IMAGE_GRABBER' (this will throw an Error in a future version of PHP)

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 take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ADVANCED_IMAGE_GRABBER - assumed 'ADVANCED_IMAGE_GRABBER' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-image-grabber/advanced_image_grabber.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/advanced-image-grabber/advanced_image_grabber.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-image-grabber/views.php:2

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 Passed 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
10 plugin tags: import image, grabber, grab media, import, media grab...

advanced-image-grabber/advanced_image_grabber.php 85% from 13 tests

The main PHP file in "Advanced Image Grabber" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-image-grabber.php" instead of "advanced_image_grabber.php")
  • Description: The description should be shorter than 140 characters (currently 462 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected278 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3914219
CSS22158
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity6.00
▷ Maximum class complexity8.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods583.33%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin