10% demomentsomtres-media-tools-auto

Code Review | DeMomentSomTres Media Tools Auto

WordPress plugin DeMomentSomTres Media Tools Auto scored 10% from 54 tests.

About plugin

  • Plugin page: demomentsomtres-m...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.6.1
  • WordPress version: 5.9.2
  • First release: Oct 8, 2013
  • Latest release: Dec 4, 2016
  • Number of updates: 10
  • Update frequency: every 115.3 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,844 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/demomentsomtres-media-tools-auto/freemius/includes/managers/class-fs-admin-menu-manager.php+123
    Undefined index: slug

Server metrics [RAM: ▼2.23MB] [CPU: ▼344.70ms] Passed 4 tests

Analyzing server-side resources used by DeMomentSomTres Media Tools Auto
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.384.44 ▼47.28
Dashboard /wp-admin2.15 ▼1.254.68 ▼29.05
Posts /wp-admin/edit.php2.15 ▼1.493.99 ▼39.42
Add New Post /wp-admin/post-new.php2.15 ▼4.824.96 ▼1,263.06
Media Library /wp-admin/upload.php2.15 ▼1.143.81 ▼21.11
Freemius Debug [v.1.2.1] /wp-admin/admin.php?page=freemius2.154.49
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins2.164.13

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 116 new files
Database: no new tables, 4 new options
New WordPress options
fs_active_plugins
fs_api_cache
fs_debug_mode
fs_accounts

Browser metrics Passed 4 tests

DeMomentSomTres Media Tools Auto: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,856 ▲10215.89 ▼0.085.83 ▼0.052.25 ▼0.21
Dashboard /wp-admin2,985 ▲1246.17 ▼0.02116.43 ▼16.91189.79 ▲24.74
Posts /wp-admin/edit.php2,795 ▲1043.39 ▲0.0365.94 ▲0.81175.94 ▲31.25
Add New Post /wp-admin/post-new.php1,735 ▼1718.50 ▼3.05375.24 ▼88.20159.38 ▼3.86
Media Library /wp-admin/upload.php1,797 ▲995.60 ▲0.06142.10 ▼10.77216.83 ▲26.27
Freemius Debug [v.1.2.1] /wp-admin/admin.php?page=freemius280.940.0817.25
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,2402.4354.36124.05

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
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/demomentsomtres-media-tools-auto/freemius/includes/managers/class-fs-admin-menu-manager.php+123
    Undefined index: slug
  • Zombie WordPress options were found after uninstall: 4 options
    • fs_accounts
    • fs_active_plugins
    • fs_api_cache
    • fs_debug_mode

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=tgmpa-install-plugins
    • > Notice in wp-content/plugins/demomentsomtres-media-tools-auto/freemius/includes/managers/class-fs-admin-menu-manager.php+123
    Undefined index: slug

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/demomentsomtres-media-tools-auto/lib/class-tgm-plugin-activation.php:161

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Network (severe)
    wp-admin/admin.php?page=freemius - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: images, post thumbnails, media, featured images, media library

demomentsomtres-media-tools-auto/dms3-media-tools-auto.php 92% from 13 tests

The primary PHP file in "DeMomentSomTres Media Tools Auto" version 2.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("demomentsomtres-media-tools-auto.php" instead of "dms3-media-tools-auto.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
Everything looks great! No dangerous files found in this plugin17,766 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP723,4208,25513,962
PO File26506591,608
Sass15248801,558
Markdown21090334
JavaScript43763229
JSON20042
YAML22022
CSS90011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity42.10
▷ Minimum class complexity1.00
▷ Maximum class complexity946.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes40
▷ Abstract classes25.00%
▷ Concrete classes3895.00%
▷ Final classes00.00%
Methods668
▷ Static methods8713.02%
▷ Public methods49674.25%
▷ Protected methods182.69%
▷ Private methods15423.05%
Functions55
▷ Named functions55100.00%
▷ Anonymous functions00.00%
Constants93
▷ Global constants7681.72%
▷ Class constants1718.28%
▷ Public constants17100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%