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-4.5
  • WordPress version: 5.8.1
  • First release: Aug 12, 2011
  • Latest release: Apr 17, 2016
  • Number of updates: 15
  • Update frequency: every 116.9 days
  • Top authors: mdempfle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 4,316 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • 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.77MB] [CPU: ▼217.31ms] Passed 4 tests

Analyzing server-side resources used by TinyWebGallery wrapper
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.86 ▼0.8610.21 ▼6.68
Dashboard /wp-admin1.88 ▼1.184.96 ▼36.22
Posts /wp-admin/edit.php1.88 ▼1.233.62 ▼30.16
Add New Post /wp-admin/post-new.php1.88 ▼3.563.92 ▼781.59
Media Library /wp-admin/upload.php1.88 ▼1.123.88 ▼21.27

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 2 new options
New WordPress options
twgWrapperAdminOptions
widget_twg_random_image_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for TinyWebGallery wrapper
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,826 ▲17515.98 ▲0.328.65 ▲2.3275.72 ▲0.97
Dashboard /wp-admin2,935 ▲396.09 ▼0.04117.16 ▼12.42170.69 ▲6.17
Posts /wp-admin/edit.php2,745 ▲83.24 ▲0.0264.28 ▲2.94131.55 ▼8.89
Add New Post /wp-admin/post-new.php3,707 ▼2818.58 ▲0.06438.25 ▲10.92154.49 ▼4.80
Media Library /wp-admin/upload.php1,757 ▲55.56 ▲0.09136.17 ▼9.18182.22 ▼6.21
TinyWebGallery /wp-admin/tinywebgallery-wrapper.php260.940.0322.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > 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
  • The uninstall procedure has failed, leaving 2 options in the database
    • widget_twg_random_image_widget
    • twgWrapperAdminOptions

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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 a shallow check for browser errors
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

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:
  • Screenshots: Screenshot #1 (The section to enter the TWG admin details.) image not found
  • Plugin Name: Please specify the plugin name on the first line ( === tinywebgallery-wrapper === )
Please take inspiration from this readme.txt

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

The entry point to "TinyWebGallery wrapper" version 2.4 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
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

Analyzing cyclomatic complexity and code structure
No 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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%