78% image-sitemap

Code Review | Image Sitemap

WordPress plugin Image Sitemap scored78%from 54 tests.

About plugin

  • Plugin page: image-sitemap
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2014
  • Latest release: Dec 7, 2014
  • Number of updates: 31
  • Update frequency: every 0.0 days
  • Top authors: gemzid (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active /11,375 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.80ms] Passed 4 tests

This is a short check of server-side resources used by Image Sitemap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.37 ▼2.58
Dashboard /wp-admin3.33 ▼0.0242.31 ▼14.98
Posts /wp-admin/edit.php3.38 ▲0.0244.87 ▲0.20
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.17 ▲11.12
Media Library /wp-admin/upload.php3.25 ▲0.0238.22 ▲6.18
Image Sitemap /wp-admin/tools.php?page=image-sitemap-generate-page3.1929.65

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Image Sitemap: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.77 ▲0.521.72 ▼0.2543.52 ▼4.28
Dashboard /wp-admin2,213 ▲255.79 ▲0.9298.72 ▼2.6239.21 ▼4.39
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0542.29 ▲4.4037.99 ▲6.14
Add New Post /wp-admin/post-new.php1,545 ▲3118.52 ▲1.04644.58 ▼2.7953.73 ▼0.75
Media Library /wp-admin/upload.php1,392 ▲74.23 ▲0.0799.86 ▼8.9944.43 ▼4.21
Image Sitemap /wp-admin/tools.php?page=image-sitemap-generate-page8452.9958.0234.61

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=image-sitemap-generate-page
    • > Notice in wp-content/plugins/image-sitemap/sitemap-image.php+34
    Undefined index: submit

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× 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/image-sitemap/sitemap-image.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: image sitemap, xml sitemap, sitemap, sitemap image

image-sitemap/sitemap-image.php 85% from 13 tests

The main PHP file in "Image Sitemap" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("image-sitemap.php" instead of "sitemap-image.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 363 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin96 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1151096

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.49
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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