10% tinywebgallery-wrapper

Code Review | TinyWebGallery wrapper

WordPress plugin TinyWebGallery wrapper scored 10% from 54 tests.

About plugin

  • Plugin page: tinywebgallery-wr...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.6-6.0.1
  • WordPress version: 6.3.1
  • First release: Aug 12, 2011
  • Latest release: Jan 18, 2023
  • Number of updates: 16
  • Update frequency: every 263.8 days
  • Top authors: mdempfle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 4,570 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/tinywebgallery-wrapper/tinywebgallery-wrapper.php+24
    Methods with the same name as their class will not be constructors in a future version of PHP; twgWrapper has a deprecated constructor

Server metrics [RAM: ▼1.84MB] [CPU: ▼52.18ms] Passed 4 tests

A check of server-side resources used by TinyWebGallery wrapper
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.49 ▼38.49
Dashboard /wp-admin2.16 ▼1.136.00 ▼43.81
Posts /wp-admin/edit.php2.17 ▼1.195.41 ▼41.92
Add New Post /wp-admin/post-new.php2.17 ▼3.725.46 ▼84.48
Media Library /wp-admin/upload.php2.17 ▼1.065.60 ▼28.88

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 15 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
twgWrapperAdminOptions
widget_recent-posts
widget_twg_random_image_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by TinyWebGallery wrapper
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.90 ▲0.307.96 ▲3.6741.09 ▼0.52
Dashboard /wp-admin2,210 ▲325.83 ▲0.85105.46 ▼5.3437.95 ▼20.46
Posts /wp-admin/edit.php2,093 ▲72.04 ▲0.0039.82 ▲4.8435.39 ▲2.16
Add New Post /wp-admin/post-new.php1,536 ▲2223.18 ▲5.61649.32 ▼39.3559.85 ▲6.67
Media Library /wp-admin/upload.php1,392 ▲14.15 ▼0.05110.12 ▲12.4143.95 ▼2.89
TinyWebGallery /wp-admin/tinywebgallery-wrapper.php260.440.0913.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/tinywebgallery-wrapper/tinywebgallery-wrapper.php+24
    Methods with the same name as their class will not be constructors in a future version of PHP; twgWrapper has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_twg_random_image_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • twgWrapperAdminOptions
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tinywebgallery-wrapper/tinywebgallery-random-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/tinywebgallery-wrapper/tinywebgallery-random-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tinywebgallery-wrapper/tinywebgallery-admin-page.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/tinywebgallery-wrapper.php
    • > Network (severe)
    wp-admin/tinywebgallery-wrapper.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === tinywebgallery-wrapper === )
  • Screenshots: Please add an image for screenshot #1 (The section to enter the TWG admin details.)
The official readme.txt might help

tinywebgallery-wrapper/tinywebgallery-wrapper.php 92% from 13 tests

The main PHP script in "TinyWebGallery wrapper" version 2.4 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected1,088 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36468807
PO File1117127259
CSS14022

PHP code Passed 2 tests

An short overview of 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.31
Average class complexity47.00
▷ Minimum class complexity35.00
▷ Maximum class complexity59.00
Average method complexity7.13
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/jfu_logo_32x32.png2.11KB1.80KB▼ 14.97%
img/logo.png5.11KB2.77KB▼ 45.75%