84% lean-media

Code Review | Lean Media

WordPress plugin Lean Media scored84%from 54 tests.

About plugin

  • Plugin page: lean-media
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-3.5
  • WordPress version: 6.3.1
  • First release: Dec 28, 2012
  • Latest release: Dec 28, 2012
  • Number of updates: 11
  • Update frequency: every 4.3 days
  • Top authors: codix (90.91%)mohanjith (18.18%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,611 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by Lean Media
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.82 ▼2.74
Dashboard /wp-admin3.32 ▲0.0249.01 ▼3.19
Posts /wp-admin/edit.php3.38 ▲0.0148.89 ▼15.94
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.86 ▼7.26
Media Library /wp-admin/upload.php3.25 ▲0.0139.49 ▲2.46

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/lean-media/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Lean Media: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.31 ▼1.251.62 ▼0.0541.57 ▼3.96
Dashboard /wp-admin2,221 ▲275.83 ▼0.0593.29 ▼7.8740.75 ▼3.17
Posts /wp-admin/edit.php2,100 ▼32.04 ▲0.0339.31 ▼11.2340.15 ▼8.99
Add New Post /wp-admin/post-new.php1,526 ▼1917.58 ▼5.58665.32 ▼6.0257.80 ▲4.23
Media Library /wp-admin/upload.php1,403 ▲94.19 ▼0.0999.56 ▼0.4744.13 ▲1.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lean-media/lean-media.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 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
4 plugin tags: thumbnail, storage, media, save

lean-media/lean-media.php Passed 13 tests

The principal PHP file in "Lean Media" v. 1.0 is loaded by WordPress automatically on each request
24 characters long description:
Delete large image files

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113843

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin