68% real-thumbnail-generator-lite

Code Review | Real Thumbnail Generator: Efficient regeneration of thumbnails in all sizes

WordPress plugin Real Thumbnail Generator: Efficient regeneration of thumbnails in all sizes scored68%from 54 tests.

About plugin

  • Plugin page: real-thumbnail-ge...
  • Plugin version: 2.6.66
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Aug 9, 2019
  • Latest release: Nov 28, 2023
  • Number of updates: 145
  • Update frequency: every 10.9 days
  • Top authors: devowl (96.55%)mguenter (4.14%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /127,187 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲2.06MB] [CPU: ▲8.31ms] 75% from 4 tests

Server-side resources used by Real Thumbnail Generator: Efficient regeneration of thumbnails in all sizes
Please have a look at the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 528.68ms on /wp-admin/admin.php?page=real-thumbnail-generator-lite-welcome)
PageMemory (MB)CPU Time (ms)
Home /5.50 ▲2.0450.86 ▲7.31
Dashboard /wp-admin5.38 ▲2.0366.46 ▼2.70
Posts /wp-admin/edit.php5.43 ▲2.0769.29 ▲19.30
Add New Post /wp-admin/post-new.php8.05 ▲2.16101.20 ▲9.34
Media Library /wp-admin/upload.php5.31 ▲2.0964.37 ▲33.66
Real Thumbnail Generator (Free) /wp-admin/admin.php?page=real-thumbnail-generator-lite-welcome5.56528.68

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 213 new files
Database: 1 new table, 14 new options
New tables
wp_rtg_attachments
New WordPress options
rpm-wpc-announcements-active_real-thumbnail-generator-lite
widget_theysaidso_widget
can_compress_scripts
rtg_liteDismissed-expire
rpm-wpc-licenseDeferredLicenseActivation_real-thumbnail-generator-lite-expire
theysaidso_admin_options
widget_recent-posts
rtg_db_migration
widget_recent-comments
rpm-wpc-puFirst_real-thumbnail-generator-lite
...

Browser metrics Passed 4 tests

An overview of browser requirements for Real Thumbnail Generator: Efficient regeneration of thumbnails in all sizes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲13917.82 ▲3.441.76 ▲0.0236.36 ▼8.56
Dashboard /wp-admin2,280 ▲1037.95 ▲2.38200.75 ▲101.6942.55 ▼1.34
Posts /wp-admin/edit.php2,177 ▲775.79 ▲3.78134.35 ▲97.4435.23 ▼1.73
Add New Post /wp-admin/post-new.php1,602 ▲6626.92 ▲3.74806.50 ▲173.0937.68 ▼16.57
Media Library /wp-admin/upload.php1,546 ▲1437.58 ▲3.40180.16 ▲84.2641.72 ▼0.22
Real Thumbnail Generator (Free) /wp-admin/admin.php?page=real-thumbnail-generator-lite-welcome1,6255.85140.79113.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_rtg_attachments
  • The uninstall procedure has failed, leaving 14 options in the database
    • can_compress_scripts
    • rtg_db_migration
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • rtg_liteDismissed
    • rpm-wpc-puFirst_real-thumbnail-generator-lite
    • rpm-wpc-announcements-active_real-thumbnail-generator-lite
    • rpm-wpc-licenseDeferredLicenseActivation_real-thumbnail-generator-lite-expire
    • widget_theysaidso_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 101× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/real-thumbnail-generator-lite/inc/attachment/Regenerate.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/vendor/devowl-wp/real-utils/src/cross/CrossSellingHandler.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/vendor/devowl-wp/utils/src/KeyValueMapOption.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/vendor/devowl-wp/utils/src/Activator.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/vendor/devowl-wp/utils/src/PackageLocalization.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/vendor/devowl-wp/utils/src/Service.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/inc/editor/impl/BFIImagick_1_3.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/vendor/devowl-wp/utils/src/Base.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/inc/view/View.php
    • > /wp-content/plugins/real-thumbnail-generator-lite/inc/rest/Analyse.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PHPSTORM_META\\expectedArguments() in wp-content/plugins/real-thumbnail-generator-lite/vendor/colinodell/json5/.phpstorm.meta.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: post thumbnails, image regenerate, regenerate images, regenerate thumbnails, thumbnails...

real-thumbnail-generator-lite/index.php 85% from 13 tests

The principal PHP file in "Real Thumbnail Generator: Efficient regeneration of thumbnails in all sizes" v. 2.6.66 is loaded by WordPress automatically on each request
You should first fix the following items:
  • 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("real-thumbnail-generator-lite.php" instead of "index.php")

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 detected17,015 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
PHP1253296,1968,643
Markdown113,52506,694
JSON6001,651
JavaScript1322314
CSS60012
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity13.06
▷ Minimum class complexity1.00
▷ Maximum class complexity111.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces29
Interfaces4
Traits20
Classes80
▷ Abstract classes56.25%
▷ Concrete classes7593.75%
▷ Final classes34.00%
Methods702
▷ Static methods10014.25%
▷ Public methods60486.04%
▷ Protected methods415.84%
▷ Private methods578.12%
Functions34
▷ Named functions617.65%
▷ Anonymous functions2882.35%
Constants155
▷ Global constants3220.65%
▷ Class constants12379.35%
▷ Public constants123100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected