84% shrinkwrap-images

Code Review | Shrinkwrap Images

WordPress plugin Shrinkwrap Images scored84%from 54 tests.

About plugin

  • Plugin page: shrinkwrap-images
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.1.3
  • WordPress version: 6.3.1
  • First release: Dec 6, 2017
  • Latest release: Sep 8, 2023
  • Number of updates: 42
  • Update frequency: every 50.1 days
  • Top authors: EmpireOfLight (97.62%)joemoto (4.76%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active /4,733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Shrinkwrap Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.32 ▼1.45
Dashboard /wp-admin3.31 ▲0.0145.53 ▼4.12
Posts /wp-admin/edit.php3.36 ▲0.0148.28 ▼11.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.32 ▼12.69
Media Library /wp-admin/upload.php3.23 ▲0.0136.14 ▲1.21

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Shrinkwrap Images
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲17714.18 ▼0.208.19 ▲6.1139.50 ▲0.26
Dashboard /wp-admin2,203 ▲155.81 ▼0.0998.06 ▼1.7639.47 ▼2.33
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0137.48 ▼4.2636.93 ▲1.75
Add New Post /wp-admin/post-new.php1,392 ▼14218.42 ▼4.55602.40 ▼91.2447.34 ▼17.11
Media Library /wp-admin/upload.php1,382 ▲34.23 ▼0.0099.10 ▼10.1242.86 ▼3.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/shrinkwrap-images/shrinkwrap_images.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: anti-piracy, image

shrinkwrap-images/shrinkwrap_images.php 92% from 13 tests

The entry point to "Shrinkwrap Images" version 1.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("shrinkwrap-images.php" instead of "shrinkwrap_images.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin98 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
Markdown133047
PHP171418
CSS13017
JavaScript241216

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected