83% tattoo-images

Code Review | Tattoo Images

WordPress plugin Tattoo Images scored 83% from 54 tests.

About plugin

  • Plugin page: tattoo-images
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Jan 6, 2014
  • Latest release: Jan 6, 2014
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: nerijuso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 818 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

Analyzing server-side resources used by Tattoo Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0261.42 ▲16.69
Dashboard /wp-admin3.32 ▲0.0156.16 ▲2.70
Posts /wp-admin/edit.php3.37 ▲0.0152.69 ▲0.63
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.71 ▼6.73
Media Library /wp-admin/upload.php3.24 ▲0.0142.00 ▲6.28

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
gallery_images
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Tattoo Images
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1313.29 ▼1.512.06 ▲0.2648.14 ▲3.72
Dashboard /wp-admin2,208 ▲24.89 ▼0.95114.61 ▲16.6343.74 ▲7.13
Posts /wp-admin/edit.php2,091 ▼12.02 ▲0.0535.52 ▼1.4234.06 ▲1.61
Add New Post /wp-admin/post-new.php1,531 ▼623.18 ▼0.36718.18 ▲87.1663.05 ▲3.16
Media Library /wp-admin/upload.php1,393 ▲54.20 ▲0.07101.67 ▼9.3546.74 ▲1.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/tattoo-images/gallery-wp-plugin.php:14
    • > PHP Warning
      Use of undefined constant _gallery_IMAGES_STATIC_URL - assumed '_gallery_IMAGES_STATIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/tattoo-images/template-interface.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/tattoo-images/gallery-initvar.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tattoo-images/wp-upload-image.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/tattoo-images/gallery-initvar.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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 need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Search results.), #2 (Standard media dialogue for selected image.), #4 (Tattoo Images in WordPress post.)
You can look at the official readme.txt

tattoo-images/gallery-wp-plugin.php 92% from 13 tests

"Tattoo Images" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tattoo-images.php" instead of "gallery-wp-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin887 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP8128177612
CSS1330212
JavaScript17463

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 1.16MB with 0.77MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png202.29KB79.74KB▼ 60.58%
screenshot-1.png731.92KB208.39KB▼ 71.53%
screenshot-3.png252.79KB80.69KB▼ 68.08%