90% slimage

Code Review | Slimage

WordPress plugin Slimage scored90%from 54 tests.

About plugin

  • Plugin page: slimage
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2018
  • Latest release: Dec 29, 2022
  • Number of updates: 8
  • Update frequency: every 196.1 days
  • Top authors: gsarig (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,838 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.11MB] [CPU: ▼5.20ms] Passed 4 tests

A check of server-side resources used by Slimage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.61 ▲6.33
Dashboard /wp-admin3.42 ▲0.1250.76 ▲3.10
Posts /wp-admin/edit.php3.53 ▲0.1846.78 ▼10.77
Add New Post /wp-admin/post-new.php6.00 ▲0.1283.61 ▼17.64
Media Library /wp-admin/upload.php3.35 ▲0.1240.25 ▲4.52

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Slimage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.021.68 ▲0.1343.74 ▲5.82
Dashboard /wp-admin2,192 ▲145.53 ▼0.1383.16 ▼17.6538.49 ▲2.12
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0436.02 ▼0.1731.70 ▼1.56
Add New Post /wp-admin/post-new.php1,533 ▲723.04 ▼0.50664.09 ▼14.4963.40 ▲15.71
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.10100.14 ▼21.2243.06 ▼5.61

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: image, optimize, optimization, lossy, optipng...

slimage/slimage.php 92% from 13 tests

The main file in "Slimage" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 165 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin574 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP883109447
CSS118080
JavaScript171036
XML10011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.25
▷ Minimum class complexity11.00
▷ Maximum class complexity21.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods522.73%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin