90% simple-image-grabber

Code Review | Simple Image Grabber

WordPress plugin Simple Image Grabber scored90%from 54 tests.

About plugin

  • Plugin page: simple-image-grabber
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.3
  • WordPress version: 6.3.1
  • First release: Mar 12, 2009
  • Latest release: Aug 18, 2015
  • Number of updates: 14
  • Update frequency: every 167.9 days
  • Top authors: tinkerpriest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /16,234 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
This plugin's installer ran successfully

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

A check of server-side resources used by Simple Image Grabber
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.98 ▼4.22
Dashboard /wp-admin3.31 ▲0.0049.21 ▼1.69
Posts /wp-admin/edit.php3.36 ▲0.0047.54 ▼0.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.44 ▼15.25
Media Library /wp-admin/upload.php3.23 ▲0.0039.26 ▲1.27

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Simple Image Grabber: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.391.74 ▼0.0140.48 ▼2.44
Dashboard /wp-admin2,198 ▲215.61 ▼0.1186.36 ▼9.0138.29 ▲1.05
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0636.67 ▼4.2535.26 ▼3.30
Add New Post /wp-admin/post-new.php1,526 ▼023.77 ▲0.64684.18 ▲13.1750.40 ▼0.16
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0599.65 ▼13.0143.91 ▼2.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
8 plugin tags: get images, pictures, retrieve images, images from posts, post images...

simple-image-grabber/simple-image-grabber.php Passed 13 tests

The main PHP file in "Simple Image Grabber" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
48 characters long description:
Display one or all images from a post's content.

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 plugin62 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1185162

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected