84% advanced-image-grabber

Code Review | Advanced Image Grabber

WordPress plugin Advanced Image Grabber scored84%from 54 tests.

About plugin

  • Plugin page: advanced-image-gr...
  • Plugin version: 1.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jul 21, 2016
  • Latest release: Mar 29, 2023
  • Number of updates: 11
  • Update frequency: every 222.1 days
  • Top authors: chenyenming (72.73%)mansurahamed (36.36%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /4,205 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.90ms] Passed 4 tests

A 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 /3.50 ▲0.0345.61 ▼0.45
Dashboard /wp-admin3.34 ▲0.0451.29 ▼3.75
Posts /wp-admin/edit.php3.39 ▲0.0448.69 ▼0.23
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.70 ▼10.57
Media Library /wp-admin/upload.php3.26 ▲0.0336.91 ▼0.83
Image Grabber /wp-admin/tools.php?page=advanced-image-grabber3.2429.32

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Image Grabber
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.31 ▼1.331.94 ▲0.0142.62 ▼2.99
Dashboard /wp-admin2,222 ▲224.85 ▼1.04102.35 ▼3.0042.69 ▲3.08
Posts /wp-admin/edit.php2,104 ▲72.01 ▲0.0137.25 ▲0.5133.09 ▲1.31
Add New Post /wp-admin/post-new.php1,529 ▼217.56 ▼5.50676.45 ▼1.9156.91 ▼0.38
Media Library /wp-admin/upload.php1,407 ▲74.23 ▼0.01102.77 ▼11.8848.71 ▼1.37
Image Grabber /wp-admin/tools.php?page=advanced-image-grabber8192.0524.9126.14

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-image-grabber/views.php:2
    • > 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 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: url image, media import, import url, grab webpage, grabber...

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

The entry point to "Advanced Image Grabber" version 1.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 205 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("advanced-image-grabber.php" instead of "advanced_image_grabber.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
There were no executable files found in this plugin277 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3914218
CSS22158
JavaScript1001

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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%
Constants0
▷ Global constants00.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