84% image-point

Code Review | Image Point

WordPress plugin Image Point scored84%from 54 tests.

About plugin

  • Plugin page: image-point
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.5
  • WordPress version: 6.3.1
  • First release: Jun 6, 2017
  • Latest release: Mar 22, 2018
  • Number of updates: 11
  • Update frequency: every 26.3 days
  • Top authors: saturnplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /4,266 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.35ms] Passed 4 tests

This is a short check of server-side resources used by Image Point
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.04 ▼4.57
Dashboard /wp-admin3.38 ▲0.0348.28 ▼17.85
Posts /wp-admin/edit.php3.43 ▲0.0751.48 ▲1.76
Add New Post /wp-admin/post-new.php5.96 ▲0.0898.35 ▼14.85
Media Library /wp-admin/upload.php3.30 ▲0.0735.97 ▼0.14
Image Points /wp-admin/edit.php?post_type=image_point3.3743.49
Add Image Point /wp-admin/post-new.php?post_type=image_point3.3649.55

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Image Point: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.47 ▲0.071.76 ▼0.0544.26 ▲4.46
Dashboard /wp-admin2,230 ▲395.83 ▼0.02102.39 ▼19.4640.71 ▼1.66
Posts /wp-admin/edit.php2,116 ▲242.03 ▼0.0836.94 ▼6.5334.87 ▼0.32
Add New Post /wp-admin/post-new.php1,537 ▲2317.65 ▲0.11619.16 ▼52.6356.43 ▲4.15
Media Library /wp-admin/upload.php1,409 ▲214.32 ▲0.0098.61 ▼18.2943.55 ▼5.08
Image Points /wp-admin/edit.php?post_type=image_point1,2533.6963.0530.66
Add Image Point /wp-admin/post-new.php?post_type=image_point1,7014.0388.3736.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-point/admin/templates/metabox-shortcode.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/image-point/trunk/image-point.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-point/admin/templates/metabox-preview.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-point/admin/templates/metabox-points.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/image-point/image-point.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-point/trunk/admin/templates/metabox-preview.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-point/trunk/admin/templates/metabox-points.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/image-point/trunk/admin/templates/metabox-shortcode.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === image-point === )
Please take inspiration from this readme.txt

image-point/image-point.php Passed 13 tests

This is the main PHP file of "Image Point" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
55 characters long description:
A lightweight and responsive image map WordPress plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,905 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS21264752
JavaScript318460663
PHP6559329
Sass180161

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity12.67
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/admin/img/transparent.png0.09KB0.09KB0.00%
admin/img/transparent.png0.09KB0.09KB0.00%