10% tiny-pictures-image-cdn

Code Review | tiny.pictures Image CDN

WordPress plugin tiny.pictures Image CDN scored10%from 54 tests.

About plugin

  • Plugin page: tiny-pictures-ima...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.3.0
  • WordPress version: 6.3.1
  • First release: Jun 30, 2018
  • Latest release: Oct 24, 2019
  • Number of updates: 7
  • Update frequency: every 68.7 days
  • Top authors: tinytools (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /567 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/tiny-pictures-image-cdn/tiny.pictures-image-cdn.php+30
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.07ms] Passed 4 tests

An overview of server-side resources used by tiny.pictures Image CDN
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.433.70 ▼40.41
Dashboard /wp-admin2.05 ▼1.265.30 ▼45.11
Posts /wp-admin/edit.php2.05 ▼1.315.50 ▼43.38
Add New Post /wp-admin/post-new.php2.05 ▼3.845.26 ▼91.36
Media Library /wp-admin/upload.php2.05 ▼1.185.67 ▼27.83
tiny.pictures /wp-admin/options-general.php?page=tinyPictures2.054.50

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for tiny.pictures Image CDN
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8613.27 ▼0.981.66 ▼0.1739.27 ▼4.85
Dashboard /wp-admin2,227 ▲425.84 ▼0.01114.40 ▲14.2044.89 ▲2.41
Posts /wp-admin/edit.php2,110 ▲242.01 ▼0.0240.20 ▲3.6636.89 ▲4.31
Add New Post /wp-admin/post-new.php1,407 ▼12918.47 ▼4.82582.96 ▼82.8958.29 ▲6.35
Media Library /wp-admin/upload.php1,409 ▲244.34 ▲0.11104.52 ▲5.6141.69 ▼1.97
tiny.pictures /wp-admin/options-general.php?page=tinyPictures1,0129.29250.5186.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/tiny-pictures-image-cdn/tiny.pictures-image-cdn.php+30
    Undefined index: user
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • tinyPictures
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tinyPictures
    • > Notice in wp-content/plugins/tiny-pictures-image-cdn/settings.php+11
    Undefined index: user

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
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function TinyPictures\\get_option() in wp-content/plugins/tiny-pictures-image-cdn/tiny.pictures-image-cdn.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/tiny-pictures-image-cdn/settings.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: Please take inspiration from this readme.txt

tiny-pictures-image-cdn/tiny.pictures-image-cdn.php 85% from 13 tests

This is the main PHP file of "tiny.pictures Image CDN" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tiny-pictures-image-cdn.php" instead of "tiny.pictures-image-cdn.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected293 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32013244
JavaScript10249

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.50
▷ Minimum class complexity11.00
▷ Maximum class complexity12.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods770.00%
▷ Protected methods330.00%
▷ Private methods00.00%
Functions9
▷ Named functions00.00%
▷ Anonymous functions9100.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